Subject: Re: libssh2_sftp_write blocks for about 3 minutes

Re: libssh2_sftp_write blocks for about 3 minutes

From: Will Cosgrove via libssh2-devel <libssh2-devel_at_cool.haxx.se>
Date: Fri, 27 Oct 2017 10:31:04 -0700

By default there is no timeout value. You can change the timeout to by using this API:

libssh2_session_set_timeout().

Will

> On Oct 27, 2017, at 6:13 AM, Jerome Zimmermann <Jerome.Zimmermann_at_ipetronik.com> wrote:
>
> Hi list,
>
> we have the behavior that if the connection gets lost during
> the SFTP data transfer the application than remains for
> about 3 minutes in the send routine (function 'libssh2_sftp_write').
> During this time the CPU usage remains at around 100 %.
>
> The application is using the same send mechanism as
> described in the example 'sftp_write_sliding.c'.
>
> The last error message is: "Unable to send channel data" with error 'LIBSSH2_ERROR_SOCKET_SEND'.
>
> Further, the session is using the blocking mode.
>
> We have this behavior with libssh2 version 1.4.3 and libssh2 version 1.8.0.
>
> But why does the blocking time take so long?
>
> Do you have an idea?
>
> Best regards
> Jerome
>
> Impressum/Imprint: https://www.ipetronik.com/impressum <https://www.ipetronik.com/impressum>
>
>
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2017-10-27