Hello,
I'm using Apache Camel 2.9.1 which in turn uses jsch 0.1.44 for its sftp
support. Our application polls a remote sftp server once a minute 24/7.
Whenever a file is discovered in a remote folder it is downloaded. We
connect and disconnect for every poll.
I have previously written about this in the following thread:
http://www.mailinglistarchive.com/html/jsch-users@lists.sourceforge.net/2012-09/msg00014.html
Yesterday this happened again and our application then stopped polling the
remote sftp server. This time I used jconsole to get a stacktrace to see
where jsch was stuck. Here it comes:
State: TIMED_WAITING on com.jcraft.jsch.Channel$MyPipedInputStream@15ff1d2
Total blocked: 387 148 Total waited: 1 012 049
*Stack trace: *
* java.lang.Object.wait(Native Method)*
*java.io.PipedInputStream.read(PipedInputStream.java:310)*
*java.io.PipedInputStream.read(PipedInputStream.java:361)*
*com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2333)*
*com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2359)*
*com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:1819)*
*com.jcraft.jsch.ChannelSftp.getHome(ChannelSftp.java:1897)*
*com.jcraft.jsch.ChannelSftp.getCwd(ChannelSftp.java:1912)*
*com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(ChannelSftp.java:2368)*
*com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1185)*
*
org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:442)
*
*
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:89)
*
*
org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:49)
*
*
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:83)
*
*
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)
*
*java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)*
*java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)*
*java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)*
*
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
*
*
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
*
*
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
*
*
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
*
*
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
*
*java.lang.Thread.run(Thread.java:662)*
I'm hoping this might be a clue for someone to solve the "freezing" problem.
Jsch has hung on a low level PipedInputStream.read(). It has been hung for
2-3 days. It seems to me that if TCPKeepAlive is used, then this should not
happen. Is Jsch using TCPKeepAlive by default or is that something that
must be configured? Or, am I missing a read timeout somewhere?
/Bengt
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users