The report is the newest thread tracking,i restart the application, no problem found now,but i don't know when the problem will happen
I found a problem that when i start my application,after a while,it will taken more than 90% cpu.And in my thread tracking(I use jstack to find threads information),i found a thread that named 'http-nio-BlockPoller',it taken 90% cpu,and in the thread call,i found it locked for a long time,and it shows the problem begins with 'org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:313)'.Then i checked my codes,but i can not find any problems of my code,so it maybe tomcat's problem?Who can teach me how to fixed this problem?Thank you very much!
Report URL - https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjIvMDEvMTgvLS10aHJlYWRzcy56aXAtLTYtMjktMzM=
The report is the newest thread tracking,i restart the application, no problem found now,but i don't know when the problem will happen
"http-nio-57253-BlockPoller" #16 daemon prio=5 os_prio=0 tid=0x00007fbdf527e800 nid=0x38394 runnable [0x00007fbdcc7ea000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000007011afc68> (a sun.nio.ch.Util$3)
- locked <0x00000007011afc58> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000007011afb30> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:313)
Hi Junxin,
Are you using log4j in your application for logging?
If so most of your HTTP threads are blocked in log4j.
You probably have a log4j level too low (eg trace)
This leads to :
Try to set the log4j level to WARN.
This may not correct all your problems, it may help.
Edit your Comment