Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Im getting ThreadLocals it means your application orand the libraries it on the console on shutdown.

DonPerera
Contributor
January 11, 2020

 

2020-01-11 16:16:48,193 localhost-startStop-2 ERROR      [c.atlassian.threadlocal.BruteForceThreadLocalCleanup] Thread[process reaper,10,system] created a ThreadLocal with key of type [org.apache.log4j.helpers.ThreadLocalMap] (value [org.apache.log4j.helpers.ThreadLocalMap@6f36ef4e]) and a value of type [null] (value [null]). This will be cleaned up

If you see any log messages about ThreadLocals it means your application orand the libraries it uses have left ThreadLocal variables dangling.

The code should have called ThreadLocal.remove() after the request thread was finished. Setting a ThreadLocal to null is not good enough. Its is still leaking inside that Thread.

The ThreadLocal cleanup code has run and forcibly remove them by calling the reflective equivalent of ThreadLocal.remove() for you.

This message is only shown in DEVMODE for Atlassian developers.

Production code will only see these messages if they have DEBUG level logging turned on.

Customers, however, will also NOT see warnings from Tomcat about these ThreadLocal leaks and hence this will reduce anxiety and support while increasing their confidence in our products.



How Can I fix this issue.

 

0 answers

Suggest an answer

Log in or Sign up to answer