See forum post https://www.mirthcorp.com/community/forums/showthread.php?t=11371 for history of issue.
All of the seemingly unrelated errors have to do with the server terminating the connection. My thread dump showed that the Jsch session thread was not running when the channel was stuck polling.
After 8 occurances of these errors is when the channel gets stuck. org.apache.commons.pool2.impl.GenericObjectPoolConfig.DEFAULT_MAX_TOTAL is also 8.
The issue appears to be in the releaseConnection method of com.mirth.connect.connectors.file.FileConnector. If the FileSystemConnection is not connected, it neither returns it to the pool nor invalidates it.
I was able to verify this with the following code:
Which logged the following when my channel was stuck:
I was able to reproduce this in a test environment by setting up a sftp server with artifical network delay. Once the file reader started reading a file I would kill the sftp server to sever the connection and then restart the sftp server. After 8 iterations of this the channel was stuck in a polling state.