You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Prak upad <pu...@gmail.com> on 2022/11/15 02:01:58 UTC
High Number of sshd-SshClient Thread
Hi Team,
We have seen an issue in our production where our process using apache mina
failed with error "java.lang.OutOfMemoryError: unable to create new native
thread"
We try to simulate that issue with a simple code doing one operation of PUT
file on a remote location. we observer there are 18 Threads of below stack
is created
sshd-SshClient[3c0574ec]-nio2-thread-17
stackTrace:
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000a3c0ec90> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(
AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.LinkedBlockingQueue.take(
LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask(
ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(
ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
If we increase the thread like 2 threads doing the operation i see the
above thread stack is increasing twice like 36..
we are using Apache Mina 2.7 Version.
Any help is much appreciated.
Attached is the Thread Dump. for reference.
thanks