Radi
Radi

Reputation: 6584

High CPU Usage by Tomcat

I used Visualvm to analyze high cpu usage for tomcat 7 on my server, following is the top usage : enter image description here my configuration in server.xml file:

<Connector port="80" protocol="HTTP/1.1"  connectionTimeout="20000"
        redirectPort="8443" maxThreads="800" minSpareThreads="150" URIEncoding="UTF-8"/>

please help me find what cause this problem and how solve it .

Thanks in advance.

Upvotes: 0

Views: 3619

Answers (1)

Stephen C
Stephen C

Reputation: 718728

There is not sufficient information / evidence to explain what is going on. This could be a direct result of having an excessive number of request threads, or it could underlying problem in your webapp that is exacerbated by the number of threads.

The only (possible) clue I can pull out of this is that (maybe) the high TakeQueue value means something is doing a lot of internal request forwarding.

I suggest:

  • Reduce the number of threads by a factor of 10 or more to see if that makes any difference. It is a bad thing to have a huge number of threads active at the same time. As in ... bad for system performance.

  • Use visualvm to try tp work out what the worker threads are doing.

  • See if you can spot errors or unusual behaviour in the tomcat logs, and the request logs. (Turn the logging levels up to the max ...)

Upvotes: 1

Related Questions