ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Scherbakov <alexey.scherbak...@gmail.com>
Subject Cleaning internal thread locals
Date Tue, 05 Apr 2016 17:36:05 GMT

Currently I'm working on the IGNITE-967

In fact, it is well known, easily reproduceable, ClassLoader memory leak
problem in managed environments, such as servlet containers.
See http://wiki.apache.org/tomcat/MemoryLeakProtection to read more on that.
In short, the code using thread locals is responsible for cleaning them
after request processing
to prevent memory leaks related to different lifetime of application and
thread in pool.
Also blindly reusing thread from pool can be dangerous, because current
ThreadLocal value can be different from expected default value.

One posiible way of solving the problem is using post-processing Filter,
which is responsible for cleaning all thread locals on current thread.

Another approach would be sticking with container's specific solution to
this problem.
On example, tomcat provides the configuration property
which forces it to renew threads involved in servicing requests for
destroyed context, thus removing leaks.

What do you think?


Best regards,
Alexei Scherbakov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message