# HELP:  SFTP stalls consistently at 160KB

## theosib

I'm having a problem with git push over ssh that I traced down to ssh being the problem.  If I try to upload a file larger than 160KB, then sftp will stall at 160KB.  I can't find any setting that would cause this, and I haven't been able to find anything really useful by google search.  Can anyone help me figure out what's going wrong here?

BTW, this happens regardless of whether the client is on the local network or elsewhere.

I tried adding the "-vvv" flag to sftp.  I get tons of messages before the transfer starts but none during the transfer and little after it stalls.  Now, it stalls at 224K, and I see this:

```
debug2: tcpwinsz: 66608 for connection: 3

debug2: tcpwinsz: 66608 for connection: 3

debug2: tcpwinsz: 66608 for connection: 3

MacOSXUpdCombo10.7.3.dmg                                                                      0%  224KB   0.4KB/s   0.0KB/s - stalled -

debug2: tcpwinsz: 66608 for connection: 3

debug2: tcpwinsz: 66608 for connection: 3

debug2: tcpwinsz: 66608 for connection: 3

MacOSXUpdCombo10.7.3.dmg                                                                      0%  224KB   0.0KB/s   0.0KB/s - stalled -
```

Thanks!

----------

## theosib

Noting interesting in the log:

```
May 28 09:14:32 compute0 sshd[11110]: SSH: Server;Ltype: Version;Remote: 192.168.1.107-53894;Protocol: 2.0;Client: OpenSSH_5.9p1-hpn13v11

May 28 09:14:32 compute0 sshd[11110]: SSH: Server;Ltype: Kex;Remote: 192.168.1.107-53894;Enc: aes128-ctr;MAC: hmac-md5;Comp: none [preauth]

May 28 09:14:33 compute0 sshd[11110]: SSH: Server;Ltype: Authname;Remote: 192.168.1.107-53894;Name: millerti [preauth]

May 28 09:14:33 compute0 sshd[11110]: Accepted publickey for millerti from 192.168.1.107 port 53894 ssh2

May 28 09:14:33 compute0 sshd[11110]: pam_unix(sshd:session): session opened for user millerti by (uid=0)

May 28 09:14:33 compute0 sshd[11119]: subsystem request for sftp by user millerti

May 28 09:16:56 compute0 sshd[11119]: Received disconnect from 192.168.1.107: 11: disconnected by user

May 28 09:16:56 compute0 sshd[11110]: pam_unix(sshd:session): session closed for user millerti
```

----------

## theosib

I tried sending from a remote machine to my server via sftp, and then it stalled at 448K.  Not much difference between lan-local and remote here, other than speed.  In any case, it always stalls out at some point.  And since it's not 100% consistent, then it's not some hard limit being set in a config file.

----------

## EatMeerkats

https://forums.gentoo.org/viewtopic-p-7036250.html

----------

## theosib

 *EatMeerkats wrote:*   

> https://forums.gentoo.org/viewtopic-p-7036250.html

 

I wish this forum has a "this was very helpful" button.   :Smile: 

Thanks!

----------

## EatMeerkats

Glad that was it… not an easy problem to fix, unless you know where to look.  I just happened to remember reading that thread recently…  :Smile: 

----------

## cach0rr0

 *EatMeerkats wrote:*   

> Glad that was it… not an easy problem to fix, unless you know where to look.  I just happened to remember reading that thread recently… 

 

same. that burned me earlier this week on an scp job that was less than 3MB. 

I'd have been scratching my head for weeks otherwise. downgraded to 1.0.0j, restarted openssh, and things were lovely

----------

