I have problem on undeploy of a web app which uses redisson, I'm running a java web app on Glassfish 4.1.2 (build 1), and when I try to gracefully undeploy the app I get the ERROR :
[2017-11-04T14:18:42.995+0100] [glassfish 5.0] [SEVERE] [] [javax.enterprise.web.util] [tid: _ThreadID=51 _ThreadName=admin-listener(1)] [timeMillis: 1509801522995] [levelValue: 1000] [[
The web application [/web] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2727e742]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@71bcc175]) 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.]]
also the stop time of the app drastically increases to around 5 minutes, instead of the normal 1 minute max. If I remove redisson from the app the app stops in regular time.
I'm using
Glassfish 4.1.2 (build 1)
java version "1.8.0_144"
Redisson 3.5.4
Netty 4.1.15.FInal
The Redisson shutdown method looks like:
public static void shutdown() {
try {
redisson.shutdown(1,2,TimeUnit.SECONDS);
FastThreadLocal.removeAll();
FastThreadLocal.destroy();
InternalThreadLocalMap.remove();
InternalThreadLocalMap.destroy();
GlobalEventExecutor.INSTANCE.shutdownGracefully(1,2,TimeUnit.SECONDS).get();
}
} catch (Exception e) {
}
}
The thread dump during undeploy looks like :