Reputation: 1212
all: here is my problem: when I use shundown.bat to close tomcat, but it's failed,and here some logs:
Severe: The web application [/shop] appears to have started a thread named [ConnectionStateManager-0] but has failed to stop it. This is very likely to create a memory leak.
2013-10-22 11:38:10 org.apache.catalina.loader.WebappClassLoader clearReferences
Severe: The web application [/shop] appears to have started a thread named [CuratorFramework-0] but has failed to stop it. This is very likely to create a memory leak.
From the log we can know it's may be some Thread can not stop,and may cause memeory leak;
dose anyone see this before or someone can give some soultions,thank you
Upvotes: 1
Views: 3292
Reputation: 14259
It might be best if you direct that question to the creator of that Shop Servelet, only he/she knows for sure.
A Servlet is supposed to be stateless, but it doesn't have to be. However if you break out of that stateless system (in this case by keeping a special Thread alive), TomCat can no longer ensure that the cleanup will be done properly, hence the warning. Therefore this can be an issue, but doesn't have to be, if coded correctly.
Upvotes: 1
Reputation: 481
Well, if you are shutting down tomcat, it doesn't matter if some thread wont stop. Once the java process ends, each thread will die and the memory will be free.
Just take care that java process does not hang, maybe you can add the kill rule in shutdown.bat calling it with -force
(refer to tomcat manual for it, i'm not windows aware), or just check for it from your task manager.
Hope it hepls
P.S. Since I remember I always had those log lines in my environments, but I never had any trouble with them.
Upvotes: 1