0 votes
by (120 points)
edited by

have setup custom time out (300000ms means 5 min)using sftpConnection.Timeout .but it is not waiting till 5 min
just it is trying to connect sftpConnection.Connect()if any thing wrong immediately it is showing error.

Expected:it should wait till 5 min after that timeout error will come
Rebex version :2.5.6291.0

Applies to: Rebex SFTP

1 Answer

0 votes
by (144k points)
  • Which version of Rebex SFTP do you use?
  • Can you reproduce this easily? If so, how can we reproduce it ourselves?
by (120 points)
version :2.5.6291.0
yes we can reproduce.just give wrong ip address before
sftpConnection.Connect();
it should wait till 5 min after that timeout error will come
by (144k points)
Oh, I see! However, this behavior is by design. In case of TCP/IP connectivity errors, applications CANNOT prevent the operating system's TCP/IP layer from failing sooner if no connection can be established. So for connection establishment, the Timeout value is just the upper limit. TCP/IP socket connect attempt timeout is an OS setting, and to enlarge the timeout value, you have to tweak your operating systems TCP/IP settings.
by (120 points)
How to changes in OS setting
by (144k points)
There used to be TcpInitialRTT/TcpMaxConnectRetransmissions settings that could be changed (see
https://serverfault.com/questions/193160/which-is-the-default-tcp-connect-timeout-in-windows for details), but apparently, these no longer apply to recent Windows versions. I have not been able to find any replacement settings - please contact Microsoft support to find out whether this is still possible, and how.
...