Spring Integration - SFTP - JSCH - Session disconnects

Best guess is the remote directory doesn't exist. The failure is during the list operation.

I had 20 odd directories to poll, so therefore at the startup, SI SFTP adapter will try to instantiate minimum 20 connections/sessions with the remote server. But my cacheSessionFactory settings of poolsize=10 and sessionWaitTimeout=1000. Clearly that was the problem, the poolsize was limiting to 10, whereas i had 20 directories to pool. SI/Spring sftp was trying its best to share these 10 connections among 20 pollers. ====Setting the poolsize=50 and sessionTimeOut=10000 .. works like a charm.