Web应用程序似乎已启动名为[22]的线程但未能将其停止。这很可能造成内存泄漏 [英] A web application appears to have started a thread named [22] but has failed to stop it. This is very likely to create a memory leak
问题描述
我有一个Web应用程序,后端使用Servlet部署在tomcat上。该应用程序是简单的Java应用程序
I have a web application with Servlets in the back end deployed over tomcat. The application is simple java application.
我在服务器日志中经常看到这个错误:
严重:一个Web应用程序似乎已经启动了一个名为
[22]的线程,但是未能阻止它。这很可能是
来创建内存泄漏。
I see this error frequently in the server logs: SEVERE: A web application appears to have started a thread named [22] but has failed to stop it. This is very likely to create a memory leak.
是否有可能导致它的潜在原因?
Are there any potential reasons which might be causing it?
推荐答案
我将使用 visualvm 1.3.2 并查看正在创建的线程。请务必添加所有插件。
I'd use visualvm 1.3.2 and see what threads are being created. Be sure to add all the plug-ins.
如果您的代码没有完成,您将无法控制它。
If it's not being done by your code you won't have much control over it.
您也不知道该消息是否是红鲱鱼。在一段时间内对代码进行负载测试,并衡量会发生什么。
You also don't know if the message is a red herring or not. Load test your code over a period of time and measure what happens.
这篇关于Web应用程序似乎已启动名为[22]的线程但未能将其停止。这很可能造成内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!