debugging JBoss 100% CPU usage

前端 未结 4 872
名媛妹妹
名媛妹妹 2021-02-06 12:51

Originally posted on Server Fault, where it was suggested this question might better asked here.

We are using JBoss to run two of our WARs. One is our web app, the other

4条回答
  •  长情又很酷
    2021-02-06 13:12

    There's a quick and dirty way of identifying which threads are using up the CPU time on JBoss. Go the the JMX Console with a browser (usually on http://localhost:8080/jmx-console, but may be different for you), look for a bean called ServerInfo, it has an operation called listThreadCpuUtilization which dumps the actual CPU time used by each active thread, in a nice tabular format. If there's one misbehaving, it usually stands out like a sore thumb.

    There's also the listThreadDump operation which dumps the stack for every thread to the browser.

    Not as good as a profiler, but a much easier way to get the basic information. For production servers, where it's often bad news to connect a profiler, it's very handy.

提交回复
热议问题