> From: Leon Rosenberg [mailto:rosenberg.l...@gmail.com] > Subject: Re: Exeptions after upgrading to tomcat 7
> First we are talking about a ThreadLocal, not Thread. Read the logs again; besides the ThreadLocal abuse, there are two threads left lying around: > > SEVERE: The web application [/solr] appears to have started a thread named > > [localhost-startStop-1-SendThread(zookeeper2:2181)] but has failed to stop > > it. This is very likely to create a memory leak. > > SEVERE: The web application [/solr] appears to have started a thread named > > [localhost-startStop-1-EventThread] but has failed to stop it. This is very > > likely to create a memory leak. > Maybe I'm missing something here, but I never seen how ThreadLocal does > real harm, neither I can imagine it, please enlighten me ;-) Abusing ThreadLocal (which is what's going on here) can have very serious side effects, depending on what's stored via the reference. For example, if something specific to the request or session is kept in the ThreadLocal and not refreshed on the next unrelated request, inadvertent data sharing and potential corruption can occur. During one of the Tomcat get-togethers, we had discussed associating ThreadLocal instances with sessions rather than Threads, but that would have been a good bit of work. We settled on just purging such threads from the pool. Libraries written for non-thread-pool environments should be documented as such, and used only with great caution in server environments. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org