qq_29692489
萌面人~
采纳率0%
2019-09-10 11:49 阅读 764

tomcat 占用CPU过高,求大神帮忙看看问题

10

jstack 有大量的TIME_WAITING(2392个),具体如下:

"http-nio-8000-exec-78" daemon prio=10 tid=0x00007f476c04b000 nid=0x1c3f1 waiting on condition [0x00007f40f9bec000]
   java.lang.Thread.State: TIMED_WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000006e1af7b98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
    at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
    at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)
    at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

jstat

  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT   
  0.00   0.00   3.15  29.43  24.38   8908  769.056   386  512.414 1281.470
  0.00   0.00  57.92  29.43  24.38   8908  769.056   386  512.414 1281.470
  0.00   0.00  76.54  29.43  24.38   8908  769.056   386  512.414 1281.470
 26.44   0.00   4.80  29.43  24.38   8909  769.138   386  512.414 1281.552
 26.44   0.00   5.52  29.43  24.38   8909  769.138   386  512.414 1281.552
 26.44   0.00   6.09  29.43  24.38   8909  769.138   386  512.414 1281.552
 26.44   0.00   7.69  29.43  24.38   8909  769.138   386  512.414 1281.552
 26.44   0.00  10.05  29.43  24.38   8909  769.138   386  512.414 1281.552
 26.44   0.00  11.42  29.43  24.38   8909  769.138   386  512.414 1281.552
 26.44   0.00  30.78  29.43  24.38   8909  769.138   386  512.414 1281.552

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • qq_34730277 南宫文凯 2019-09-10 16:49

    报错不全,应该是你代码出现了多进程,导致守护进程出现锁

    点赞 评论 复制链接分享
  • u013321534 525546523 2019-09-10 17:06

    这是tomcat accept 连接线程 , 比较多是因为有较大的并发连接 ,还没有释放掉 ,看看你哪个接口访问量比较大,应该是cpu比较密集

    点赞 评论 复制链接分享

相关推荐