ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Kulichenko <valentin.kuliche...@gmail.com>
Subject Re: Cleaning internal thread locals
Date Tue, 05 Apr 2016 22:45:32 GMT

I would start with defining which thread locals cause this and why they are
not properly cleaned on node shutdown. Ideally, this should never happen.


On Tue, Apr 5, 2016 at 10:36 AM, Alexei Scherbakov <
alexey.scherbakoff@gmail.com> wrote:

> Hello.
> Currently I'm working on the IGNITE-967
> <https://issues.apache.org/jira/browse/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
> 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
> renewThreadsWhenStoppingContext,
> 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