I really wanted to avoid shelling out. That seems like such a cop out.
 What's worse is that Timeout doesn't work in both ruby 1.9 and ruby
1.8 when trying to deal with this.  I am trying to get Terminator to
work but not having a lot of luck with that either.


On Wed, Jun 6, 2012 at 7:13 PM, Xavier Noria <fxn / hashref.com> wrote:
> I have recently had also some problems with Net::SFTP.
>
> Cannot help with this hang, but just in case remember that OpenSSH installs the command-line client sftp(1). With that client you can check whether the hang can be reproduced. If it does maybe the problem is not in the client side. Otherwise, it gives an alternative if shelling out is an option.
>
> Enviat des del meu iPad
>
> El 6 Jun 2012, a les 05:54, Tim Uckun <timuckun / gmail.com> va escriure:
>> I have some code which attempts to download some data from an sftp
>> server and it hangs. Once it hangs it seems to lock up the entire
>> process so the timeout is not working either. The code hangs at the
>> session.download! method (debug output below)
>>
>> The same code works for other servers and even other directories on
>> the same server so this is very baffling to me.
>>
>> I am using ruby 1.9.3 but I have also tried it with ruby 1.8.7. The
>> Timeout::timeout wrapper doesn't do anything since the blocking is
>> apparently locking up the entire process.
>>
>>
>>
>> debug output
>>
>> sending open packet (2)
>> queueing packet nr 13 type 94 len 92
>> sent 116 bytes
>> read 68 bytes
>> received packet nr 15 type 94 len 44
>> channel_data: 0 17b
>> received sftp packet 102 len 13
>> sending read packet (3)
>> queueing packet nr 14 type 94 len 44
>> sent 68 bytes
>> read 1358 bytes
>> read 742 bytes
>> received packet nr 16 type 94 len 2076
>> channel_data: 0 2048b
>> received sftp packet 103 len 2044
>> sending read packet (4)
>> queueing packet nr 15 type 94 len 44
>> sent 68 bytes
>> read 52 bytes
>> received packet nr 17 type 94 len 28
>> channel_data: 0 2b
>> read 84 bytes
>> received packet nr 18 type 94 len 60
>> channel_data: 0 32b
>> sending close packet (5)
>> queueing packet nr 16 type 94 len 44
>> sent 68 bytes
>> read 68 bytes
>> received packet nr 19 type 94 len 44
>> channel_data: 0 28b
>>
>