简体   繁体   English

Tomcat maxthreads,我做错了什么吗?

[英]Tomcat maxthreads, am I doing something wrong?

In the catalina.out I saw this message appearing in the log: 在catalina.out中,我看到此消息出现在日志中:

Maximum number of threads (200) created for connector with address null and port 80

Does this mean a process is hogging something or do I need to just increase the thread size? 这是否意味着进程正在占用某些东西,还是仅需要增加线程大小?

After restarting tomcat, I had spam like this message: 重新启动tomcat之后,我收到了如下所示的垃圾邮件:
"SEVERE: The web application [/MyServlet] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation."

Is there a way to solve my situation? 有办法解决我的情况吗?

Yes, it sounds like you've got some request handler which never completes. 是的,这听起来像您有一些永远无法完成的请求处理程序。 Each time it's invoked, it'll basically soak up another thread, until you've run out of threads in the pool. 每次调用它时,它基本上都会吸收另一个线程,直到池中的线程用完为止。

You need to work out which request is failing to complete, and fix the code. 您需要确定哪个请求无法完成,然后修复代码。 If you can take a dump of the stacks of all threads, it's likely to become clear which requests are failing to complete. 如果您可以转储所有线程的堆栈,则很可能会清楚哪些请求未能完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM