Bonjoir, Actuellement, lors d'un hot redeploy dans tomcat, le pool c3p0 semble garder les connexions ouvertes. Voici les traces au redémarrage: rave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|6c187ab5]-AdminTaskTimer] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|6c187ab5]-HelperThread-#0] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|6c187ab5]-HelperThread-#1] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|6c187ab5]-HelperThread-#2] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [H2 File Lock Watchdog /tmp/xxx/h2data-web.lock.db] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [H2 Log Writer H2DATA-WEB] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|7dfbfca7]-AdminTaskTimer] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|7dfbfca7]-HelperThread-#0] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|7dfbfca7]-HelperThread-#1] but has failed to stop it. This is very likely to create a memory leak. févr. 19, 2014 10:28:33 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/xxx] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->z8kflt90l3muy4yyzl36|7dfbfca7]-HelperThread-#2] but has failed to stop it. This is very likely to create a memory leak. 22:28:36 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] WARN ActiveManagementCoordinator:68 - A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources. J'ai trouvé un gros gros hack qui fonctionne: http://stackoverflow.com/a/7472386 ce qui semble bien démontrer qu'il y a un problème quelque part avec Topia/Hibernate (c3p0?). To be continued... -- Éric Chatellier
J'ai trouvé un gros gros hack qui fonctionne: http://stackoverflow.com/a/7472386 ce qui semble bien démontrer qu'il y a un problème quelque part avec Topia/Hibernate (c3p0?).
To be continued...
Ensuite, suivante ce ticket : https://hibernate.atlassian.net/browse/HHH-7364, l'ajout d'un Thread.sleep(2000), résout apparemment tous les problèmes: - plus de memory leak (thread en cours, jmx...) - plus de lock h2 - plus de divers non unregistrered (si on les décharge) À tester... -- Éric Chatellier
Le 19/02/2014 22:36, Eric Chatellier a écrit :
Voici les traces au redémarrage:
Au undeploy, j'ai ça 2014/02/19 04:20:51 WARN (ThreadPoolAsynchronousRunner.java:701) run An Error forced the closing of Thread[C3P0PooledConnectionPoolManager[identityToken->q3uphl90kntulsqivij1|2d647872]-HelperThread-#2,5,main]. Will attempt to reconstruct, but this might mean that something bad is happening. java.lang.NoClassDefFoundError: org/h2/store/FileStoreInputStream at org.h2.store.LobStorageBackend.removeAllForTable(LobStorageBackend.java:218) at org.h2.store.LobStorageBackend.removeAllForTable(LobStorageBackend.java:213) at org.h2.engine.Database.close(Database.java:1152) at org.h2.engine.Database.removeSession(Database.java:1069) at org.h2.engine.Session.close(Session.java:666) at org.h2.jdbc.JdbcConnection.close(JdbcConnection.java:366) at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:629) at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:259) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:619) at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1024) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:648) Caused by: java.lang.ClassNotFoundException: org.h2.store.FileStoreInputStream at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ... 11 more 2014/02/19 04:21:01 WARN (ThreadPoolAsynchronousRunner.java:743) run com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@8d706a8 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks! 2014/02/19 04:21:56 WARN (ThreadPoolAsynchronousRunner.java:653) run Thread[C3P0PooledConnectionPoolManager[identityToken->q3uphl90kntulsqivij1|2d647872]-HelperThread-#0,5,main] -- caught unexpected Exception while executing posted task. java.lang.IllegalStateException: Timer already cancelled. at java.util.Timer.sched(Timer.java:397) at java.util.Timer.schedule(Timer.java:193) at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1905) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:648) -- Brendan Le Ny, Code Lutin bleny@codelutin.com (+33) 02 40 50 29 28
Bonjour, Sauf erreur de ma part, ça a été corrigé avec topia 3.0-beta-1 : https://forge.nuiton.org/issues/3078 Cordialement, Arnaud On 19/02/2014 22:36, Eric Chatellier wrote:
Bonjoir,
Actuellement, lors d'un hot redeploy dans tomcat, le pool c3p0 semble garder les connexions ouvertes. Voici les traces au redémarrage:
participants (3)
-
Arnaud Thimel -
Brendan Le Ny -
Eric Chatellier