# All ssh based large file transfers stall

## JanErik

I have a problem on my file server that all ssh based (scp, rsync, rdiff-backup) file transfers stall on large files. It does not work in either direction.

Over NFS transfers works fine.

Seems it stopped working after I updated the machine last weekend after running a few months without update.

I have tried a different NIC, cable and switch port. Have run revdep-rebuild and python-updater. Also re-emerged libssh and openssh without any improvement.

----------

## swimmer

Same here - I even had to switch my rdiff-backup config from ssh to NFS :-/

The only visible change I could see was the switch from openssh 5.9_p1-r4 to 6.0_p1 .... but there was only *one* change in the sshd_config so far ...

```
# Allow client to pass locale environment variables #367017

AcceptEnv LANG LC_*
```

----------

## PaulBredbury

Try openssl 1.0.0j instead. Then recompile openssh.

The 1.0.1 series seems buggy.

----------

## furanku

Same here. Going back to openssl-1.0.0j and reemerging/restarting openssh did not solve the issue.

----------

## enigma59

I have the same issue doing something as simple as

```
cat largefile | ssh localhost cat > another_large_file
```

stalls it if largefile is sufficiently large, I used 4mb.  Downgrading to openssh-5.9_p1-r4 works correctly while openssh-6.0_p1 doesn't.

Edit: Just found this bug that has more discussion https://bugs.gentoo.org/show_bug.cgi?id=414401

----------

## JanErik

Downgrading to openssh-5.9_p1-r4 solved the problem.

----------

## Ant P.

Found a less intrusive workaround from a post on gentoo-user: setting "TcpRcvBufPoll no" in sshd_config fixed it for me.Last edited by Ant P. on Mon May 14, 2012 11:59 pm; edited 1 time in total

----------

## wazoo42

Ant P.s solution worked for my as well, while the different versions of openssl/openssh did not. One small note, sshd did not like "No" and I had to change it to "no".

----------

## Ant P.

My bad, "no" is correct. Fixed.

----------

## swimmer

 *Ant P. wrote:*   

> Found a less intrusive workaround from a post on gentoo-user: setting "TcpRcvBufPoll no" in sshd_config fixed it for me.

 That's the solution indeed! (At least for me)

Thank you very much Ant P. for sharing  :Smile: 

----------

## depontius

 *Ant P. wrote:*   

> Found a less intrusive workaround from a post on gentoo-user: setting "TcpRcvBufPoll no" in sshd_config fixed it for me.

 

Is there a way to do this from the client side?  I can certainly do this on those systems which I administer, but not on my employer's systems, which I don't.

----------

## Havin_it

 *depontius wrote:*   

>  *Ant P. wrote:*   Found a less intrusive workaround from a post on gentoo-user: setting "TcpRcvBufPoll no" in sshd_config fixed it for me. 
> 
> Is there a way to do this from the client side?  I can certainly do this on those systems which I administer, but not on my employer's systems, which I don't.

 

Depends how you are using SSH, but I've found that invoking it with compression ("-C") prevents the hangs I've been seeing in most cases. For rsync the arg you need is -c, for unison it's -sshargs="-C".

I also found in my case that file-size is not an issue, but it appears that certain files would always hang at a certain point (according to progress displays in rsync and unison) which makes me think that some byte[-sequence] is the trigger. Anyone else who is doing multi-file transfers, I'd welcome your own findings on that one, here or in the bug-report.

----------

## hydrapolic

 *Ant P. wrote:*   

> Found a less intrusive workaround from a post on gentoo-user: setting "TcpRcvBufPoll no" in sshd_config fixed it for me.

 

thanks, this fixed the problem  :Smile: 

EDIT:

net-misc/openssh-6.0_p1-r1 fixes  the issue, so no need to set "TcpRcvBufPoll no" anymore (bug 414401)  :Smile:  Thanks

----------

## Dan

Thanks guys. I been googling "scp stalled", on and off for a few days and trying all kinds of sysctl settings. Thanks for the real solution!

----------

