curl / Mailing Lists / curl-library / Single Mail

curl-library

RE: sftp upload request hangs with a high latency server using multi interface

From: Ketul Barot via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 5 Mar 2019 21:35:27 +0000

So, the hang is not always it happens some time but frequent enough. In my application I upload syslogs from the device every 15 mins. I see the hang after like 2 - 3 trials of this 15 min interval. Also, the file is like close to 5 MB.

In my case the timeout to abort the transfer I have kept is of 1 min. Which I think is less, now the reason I am saying it is less is from the logs I posted previously. It can be seen, the libssh2_disconnect is called even before the Key exchange happens and so it just get's stuck in the key-exchange part and you can see in the logs it just prints this line continuously,

Mar 5 19:35:52 UniTask: [libssh2] 652.844836 Transport: Redirecting into the key re-exchange from _libssh2_transport_send

Now I am testing with this timeout increased to like 5 mins and will keep it running and see if I hit the crash scenario.

I also, would like to know in libcurl do we handle the case where in at SSH layer either the session handshake failed or some issue with exchanging the keys do we exit the transfer or is there a way to do timeout in this case such that it will not be stuck doing 1 thing?

Thanks,
Ketul

From: Daniel Stenberg <daniel_at_haxx.se>
Sent: Tuesday, March 05, 2019 4:21 PM
To: Ketul Barot via curl-library <curl-library_at_cool.haxx.se>
Cc: Ketul Barot <kbarot_at_parallelwireless.com>
Subject: RE: sftp upload request hangs with a high latency server using multi interface

On Tue, 5 Mar 2019, Ketul Barot via curl-library wrote:

> Add some packet loss in the path and also you need a progress callback which
> should timeout after say 1 min if the transfer is stalled.

I gave it 10%(!) packet loss and 500 ms latency. That made my test uploads
painfully slow but they don't hang...

--
/ daniel.haxx.se<http://daniel.haxx.se>

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-03-05