New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ChannelFactory.java #8746
Conversation
Set shutdownGracefully quietPeriod & timeout as configurable parameters by properties wold be nice. As described in the shutdownGracefully javadoc: > Signals this executor that the caller wants the executor to be shut down. Once this method is called, isShuttingDown() starts to return true, and the executor prepares to shut itself down. Unlike shutdown(), graceful shutdown ensures that no tasks are submitted for 'the quiet period' (usually a couple seconds) before it shuts itself down. If a task is submitted during the quiet period, it is guaranteed to be accepted and the quiet period will start over. - tomcat 8.5 - java / spring-boot 2.2.6 - infinispan-spring-boot-starter-remote:2.3.3.Final - hodrot client The SpringRemoteCacheManager.stop() is calling nativeCacheManager.getChannelFactory.destory() but there are still some threads not closing on context undeployment: ``` 06-Oct-2020 05:38:49.075 SEVERE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ebo#infinispan#13] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@508e050f]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@753fd803]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. ``` The tomcat context.xml undeployTimeout option seems to minimize the number of threads still hanged but they are still appearing.
Can one of the admins verify this patch? |
@davidgfolch Thank you for raising the issue. We normally use Jira to track issues/feature requests. @karesti Any thoughts on the issue/suggestion? |
@ryanemerson this is a deeper change asked discovered through spring boot. @danberindei WDYT ? |
@davidgfolch Thanks for raising, I will open a JIRA after reading what @danberindei has to say about it! |
(closed because it's a bug and/or feature request) |
Thank you, Can you please reference Jira issue to follow up? |
@karesti this seems to be 2 different issues:
I'm not sure they are related, but in any case they will require much more than the title of this PR and ISPN-12434 suggest (Update ChannelFactory.java). |
@danberindei yes, I do agree. I opened the issue only with the title of the PR and the link to it because TBH I was expecting you to lighting in this issue |
Set shutdownGracefully quietPeriod & timeout as configurable parameters by properties wold be nice.
As described in the shutdownGracefully javadoc:
The SpringRemoteCacheManager.stop() is calling nativeCacheManager.getChannelFactory.destory() but there are still some threads not closing on context undeployment:
The tomcat context.xml undeployTimeout option seems to minimize the number of threads still hanged but they are still appearing.