Fork me on GitHub
#pedestal
<
2016-06-06
>
donaldball19:06:12

Does anyone else get these kinds of warnings from tomcat when stopping a pedestal war?

donaldball19:06:14

06-Jun-2016 18:14:02.800 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [clojure.lang.Var$1] (value [[email protected]]) and a value of type [clojure.lang.Var.Frame] (value [[email protected]]) 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.

donaldball19:06:00

I’ve been able to create a sample war that gives a related warning:

donaldball19:06:02

03-Jun-2016 15:04:12.628 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [sample] appears to have started a thread named [clojure.core.async.timers/timeout-daemon] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
 java.util.concurrent.DelayQueue.take(DelayQueue.java:211)
 clojure.core.async.impl.timers$timeout_worker.invokeStatic(timers.clj:60)
 clojure.core.async.impl.timers$timeout_worker.invoke(timers.clj:56)
 clojure.lang.AFn.run(AFn.java:22)
 java.lang.Thread.run(Thread.java:745)

donaldball19:06:29

But not the SEVERE warning

oliy20:06:09

apologies if this is a simple question, but are there any helper functions for the following: - enqueuing an interceptor as the next one in the chain (`io.pedestal.interceptor.chain/enqueue` adds it at the end) - enqueuing an interceptor during the leave phase (i.e. pushing it on to the :io.pedestal.interceptor.chain/stack)

oliy20:06:17

i would imagine it would live in io.pedestal.interceptor.chain if it did exist. it feels like it would be better to have a function to help you with the queue/stack internals than directly manipulating them