Subject: What EXACTLY causes the Error "The connection was closed by Server"
Date: 2018-01-16 21:39:30
From: fredy.wenger@matso.ch
Source: exactly-causes-error-the-connection-closed-server
----------------------------------------------------------------------

Hi all  
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).  

Question:  
**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  
Fredy

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index