I am using the phpseclib library for files downloaded from SFTP server. Sometimes the script does not download the file even there is a file in SFTP. Sometimes the file will download when we refresh a couple of times.
How can I reconnect automatically when the connection is lost?
Or
How to increase the active session time.