Hi Rainer,

Thanks for your reply!

We did a restart of the application earlier this week and so far the cpu usage 
is at normal levels. If/when the cpu usage goes up I will check with your 
suggested parameters!

Best regards,
Andreas

-----Original Message-----
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: den 18 januari 2018 14:46
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: Ajp Nio-thread stuck in loop and consuming a lot of cpu

Just an addition to one of Mark's questions:

Am 17.01.2018 um 22:20 schrieb Mark Thomas:
> Is it always the same threads generating the load or does it move 
> between threads?

Just in case Andreas is not aware: one can check with "top -H -p <PID>".

Using -H lets top show one line per thread instead of one line per process. 
That way you can easily see CPU use per thread. The "-p <PID>" 
would simply filter to only show the threads in your java process (by using for 
<PID> the process ID of your Tomcat java process).

Furthermore the PID column in "top -H" does not actually show the PID, but 
instead the thread IDs. If you convert that decimal numbers to hex, e.g. using 
the shell commandline

printf "0x%x\n" <ID>

(and replacing <ID> by the respective thread id of the lines that show high CPU 
usage), you get a hex number that will point you to the respective thread in 
the java thread dump by looking for tid=0x... in the thread header lines. The 
association between operating system thread number as shown in "top -H" and the 
tid in the Java thread dump does is stable during the lifetime of the process.

Regards,

Rainer

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

Reply via email to