0

我使用 Visualvm 来分析我的服务器上 tomcat 7 的高 cpu 使用率,以下是最高使用情况: 在此处输入图像描述 我在 server.xml 文件中的配置:

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

请帮我找出导致此问题的原因以及如何解决。

提前致谢。

4

1 回答 1

1

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 ...)

于 2013-07-15T00:11:29.540 回答