Profile Image
PPC

High JVM active sessions - Thread dumps analysis

Hi Team,

 

While trying to debug the high jvm active sessions count via Thread dumps, found the below mentioned threads. Any suggestions regarding the remediation steps would be appreciated. 
1 thread is looping on accept0() method in java.net.DualStackPlainSocketImpl file 
1 thread is looping on getQueuedCompletionStatus() method in sun.nio.ch.Iocp file 
1 thread is looping on eventLoop() method in sun.awt.windows.WToolkit file

 

Additional details below: Apache Tomcat/8.5.13 Java runtime version : 1.8.0_302-b08 Java runtime name : OpenJDK Runtime Environment

  • thread-dump

  • session-timeout

  • http-session

  • session-invalidate

  • highjvmactivesessions

  • threaddumpsanalysis

  • threadislooping

  • apachetomcat

  • openjdk

  • httpsessioncount

  • increaseintrafficvolume

Please Sign In or to post your comment or answer

Profile Image

Ram Lakshmanan

Hello PPC!

 

 Can you share your thread dump report? It's hard to share the feedback without seeing the thread dump. Thanks.

 

Profile Image

PPC

Here you go, Ram.

https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjIvMDYvOC8tLUFwcER5bmFtaWNzX1RocmVhZER1bXBfT2ZfTm9kZV9DU1g0UF9WQTIyUFdQUEVHMzA5XzE2NTQ2MjQ3NzU0OTcuemlwLS00LTUyLTM4

JFYI, Nothing much in the thread dumps except the details mentioned below. I am curious if you would find more from the same report.

1 thread is looping on accept0() method in java.net.DualStackPlainSocketImpl file 
1 thread is looping on getQueuedCompletionStatus() method in sun.nio.ch.Iocp file 
1 thread is looping on eventLoop() method in sun.awt.windows.WToolkit file

Thanks.

Profile Image

Ram Lakshmanan

Hello Pradeep! I reviewed your thread dump. I am not noticing any major anomaly. When you say 'high jvm active sessions count' - are you referring to HTTP session count? If so from where are you getting this session count? 

Profile Image

PPC

High HTTP sessions count was reported by AppDynamics, Ram.

I am looking for clues to understand if the above mentioned threads can cause similar high sessions count.

Profile Image

Ram Lakshmanan

Pradeep - High HTTP session count can't be attributed to thread activity (in my opinion :-). I could be wrong. Here are the places I will look:

 

a. Is there increase in traffic volume? - Can you check whether there was any increase/surge in traffic volume? More traffic can translate to more users. More users can translate to more HTTP sessions

 

b. Change in Session time out? - Was there any changes made to session timeout value? Typically in JEE application server, one would configure session timeout value in web.xml 

<session-config>
      <session-timeout>60</session-timeout>
</session-config>   

c. HTTP Session for API Calls? - Sometimes I have seen developers open HTTP session for (stateless) API calls. Can you confirm whether it's the case in your application. Even in case if HTTP session are  opened for API calls, are they terminated right after API requests are serviced?

d. Is Sessions closed when user logs out? - Whenever user logs out are you closing the session? Basically are you calling following API:

session.invalidate();

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • thread-dump

  • session-timeout

  • http-session

  • session-invalidate

  • highjvmactivesessions

  • threaddumpsanalysis

  • threadislooping

  • apachetomcat

  • openjdk

  • httpsessioncount

  • increaseintrafficvolume