Profile Image
sunil balasubramanyam

java process running through apache tomcat hangs suddenly where no exception thrown in application log!

Hi,

 

I am running java process through apach tomcat web service in rhel 7.7 . Noticed the process is getting hanged suddenly where no exception or error thrown in tomcat or application logs. Below error taken from jstack shows high number of time_waits. Please let us know what could be the reason.

 

C3P0PooledConnectionPoolManager[identityToken->2xbcwfahr4u3mf1mm8lpc|d689761]-HelperThread-#2
PRIORITY :5

THREAD ID :0X00007F69D829B800

NATIVE ID :0X36AD
NATIVE ID (DECIMAL) :13997

STATE :TIMED_WAITING

stackTrace:
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:683)
- locked <0x00000003d26e13d8> (a com.mchange.v2.async.ThreadPoolAsynchronousRunner)
Locked ownable synchronizers:
- None



Report URL - https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjEvMDUvMTIvLS0xMm1heS50eHQtLTIxLTEtMjM=

  • javaprocesshangs

  • tomcatwebservice

  • jstack

  • timewaits

  • exception

Please Sign In or to post your comment or answer

Profile Image

Ram Lakshmanan

Hello Sunil!

 Greetings.

 

 Your thread dumps looks normal. I don't see any unsual behaviour. Your application can hang in the middle abruptly due to several reasons. Some of them are:

 

a. Garbage collection pauses

b. Network connectivity

c. Load balancer routing issue

d. Heavy CPU consumption of threads

e. Operating System running with old patches

f. Memory Leak

:

 

 So just thread dumps is not enough to diagnose the problem. You have captured only thread dump, that too one snapshot of it. It's always a good practice to capture 3 thread dumps in a gap of 10 seconds between each one. Besides thread dumps you might have to capture other logs to do thorough analysis. You may consider using tools like yCrash, which would captures application level logs (like GC logs, 3 snapshots of thread dumps, heap dumps) and system level logs (like top, top -H, netstat, vmstat, iostat, dmesg, diskusage...) and does complete analysis to identify the root cause of the problem. You can register here to get a free 14 day trial of the yCrash.

 

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • javaprocesshangs

  • tomcatwebservice

  • jstack

  • timewaits

  • exception