Kirill Kireyev <kir...@instagrok.com> wrote:

>Hi!
>
>I'm periodically getting unduly high (100%) CPU usage by the tomcat 
>process on my server. This problems happens intermittently, several 
>times a week. When the server goes into this high CPU it does not come 
>back (and becomes unresponsive to new requests), and the only recourse 
>is to restart the tomcat process.
>
>I'm using Tomcat 7.0.30, with APR and Apache web server, on a Ubuntu 
>11.10 server with 32g of RAM / 8 CPUs.
>
>I've done several jstack stack traces when this occurs, and what I 
>consistently see, are the connector threads in the RUNNABLE state every
>
>time, i.e.:
>
>ajp-apr-8009-Acceptor-0" daemon prio=10 tid=0x00000000010a1000
>nid=0x539 
>runnable [0x00007f9364f8e000]
>    java.lang.Thread.State: RUNNABLE
>         at org.apache.tomcat.jni.Socket.accept(Native Method)
>         at 
>org.apache.tomcat.util.net.AprEndpoint$Acceptor.run(AprEndpoint.java:1013)
>         at java.lang.Thread.run(Thread.java:722)
>
>"http-apr-8443-Acceptor-0" daemon prio=10 tid=0x000000000109b800 
>nid=0x535 runnable [0x00007f9365510000]
>    java.lang.Thread.State: RUNNABLE
>         at org.apache.tomcat.jni.Socket.accept(Native Method)
>         at 
>org.apache.tomcat.util.net.AprEndpoint$Acceptor.run(AprEndpoint.java:1013)
>         at java.lang.Thread.run(Thread.java:722)
>
>"http-apr-8080-Acceptor-0" daemon prio=10 tid=0x00000000015ab000 
>nid=0x531 runnable [0x00007f9365a92000]
>    java.lang.Thread.State: RUNNABLE
>         at org.apache.tomcat.jni.Socket.accept(Native Method)
>         at 
>org.apache.tomcat.util.net.AprEndpoint$Acceptor.run(AprEndpoint.java:1013)
>         at java.lang.Thread.run(Thread.java:722)
>
>Other threads are in RUNNBLE too in different cases, but these are the 
>one that are always there when the high CPU occurs. That's why I'm 
>starting to think it has something to do with Tomcat.

Those threads look ok to me. As acceptor threads that is what i would expect.

>Can anyone shed some light on this?

With the information you have provided? Very unlikely.

What you need to do is use ps to look at CPU usage per thread (not per process) 
and then match the offending thread ID to the thread ID in the thread dump.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to