cancel
Showing results for 
Search instead for 
Did you mean: 

How do I cleanly shut down alfresco (failed to remove ThreadLocal)

dshookowsky
Confirmed Champ
Confirmed Champ

When shutting down the alfresco service in Windows, the log fills with error messages in the form:

"The web application [alfresco] created a ThreadLocal....but failed to remove it when stopped."

It looks like this question was asked 8 years ago (Alfresco created a ThreadLocal but failed remove it on stop), and, at that time, the response was that Tomcat was being pedantic. 

There are indications that a patch [MNT-2282] Tomcat memory leak warnings occur during the shutdown - Alfresco JIRA ) was created for this, but I can't see the details.  

Is there anything else that can be done to more cleanly shut down Alfresco?  Is this something that's not really an issue?

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

No, unfortunately there is nothing that you (or I) could do (except disabling the Tomcat component that issues these warnings). The MNT issue you referenced is extremely old (we are already way past the 20000 mark now), and it may have addressed some of the previous errors / warnings.

As far as I know, these warnings are just that: "warnings". They indicate a potential problem that may affect the system in specific scenarios. These warnings would for instances be a problem if you were to use the Tomcat Manager application to dynamically undeploy / redeploy Alfresco without restarting the Tomcat server itself. Then the resources that these warnings complain about would be kept alive, potentially impacting the re-deployed Alfresco instance. As long as you properly stop + restart Tomcat in its entirety, these warnings are nothing more than a nuisance that can be ignored - they indicate a problem that does not affect you in this particular scenario, since any data / memory structures remaining by an unclean shutdown will be thrown away anyway when the Tomcat process is stopped.

View answer in original post

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

No, unfortunately there is nothing that you (or I) could do (except disabling the Tomcat component that issues these warnings). The MNT issue you referenced is extremely old (we are already way past the 20000 mark now), and it may have addressed some of the previous errors / warnings.

As far as I know, these warnings are just that: "warnings". They indicate a potential problem that may affect the system in specific scenarios. These warnings would for instances be a problem if you were to use the Tomcat Manager application to dynamically undeploy / redeploy Alfresco without restarting the Tomcat server itself. Then the resources that these warnings complain about would be kept alive, potentially impacting the re-deployed Alfresco instance. As long as you properly stop + restart Tomcat in its entirety, these warnings are nothing more than a nuisance that can be ignored - they indicate a problem that does not affect you in this particular scenario, since any data / memory structures remaining by an unclean shutdown will be thrown away anyway when the Tomcat process is stopped.

Thanks for the quick response.