For a project, I have bought the sFTP component and developed a sFTP client, that connects to a SFTP server (hosted by IBM).
The sFTP client establish a connection by start and then does data exchange (copy .xml files) in both directions and also moves files from one to another directory on the sFTP server.
This interface should work 24/7/24 (excluding a maintenance window every Saturday, were the connection is closed automatically and re established at Sunday morning, so that the sFTP server can be shut down at Saturday, if needed).
The sFTP client works fine principally.
But, I have crashes from time to time.
Sometimes, it works for weeks 24/7, then I have multiple crashes at the same day.
The sFTp-Client crashes with the error Message:
**"The connection was closed by Server"**
I don't have implement try-catch, once the connection is established (as the files have to checked in this case before restart the client).
**What *exactly* can cause / means this error message? ("The connection was closed by Server")**
- Only a real shutdown of the sFTP server?
- Also short breaks in the network connection?
- If yes:
- how long have the break to be, that a "The connection was closed by the server" is triggered?
- are there some timeout settings that can be set?
Thanks for a fast feedback
Regards from Switzerland