appears to have started a thread named [H2 File Lock Watchdog (Socket) HELP

735 views
Skip to first unread message

RM

unread,
Nov 3, 2017, 4:59:36 PM11/3/17
to H2 Database
This happens when I undeploy my app from Tomcat. To get control back I have to shutdown TOMCAT.


but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 org.h2.store.FileLock.run(FileLock.java:515)
 java.lang.Thread.run(Thread.java:745)
03-Nov-2017 16:55:33.640 WARNING [http-nio-8080-exec-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [myapp] appears to have started a thread named [H2 TCP Server (tcp://xxxx.1xxxx.1.64:55811)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.net.PlainSocketImpl.socketAccept(Native Method)
 java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
 java.net.ServerSocket.implAccept(ServerSocket.java:545)
 java.net.ServerSocket.accept(ServerSocket.java:513)
 org.h2.server.TcpServer.listen(TcpServer.java:247)
 org.h2.tools.Server.run(Server.java:578)
 java.lang.Thread.run(Thread.java:745)
03-Nov-2017 16:55:33.641 WARNING [http-nio-8080-exec-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [myapp] appears to have started a thread named [MVStore background writer nio:/mydb.mv.db] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2715)
03-Nov-2017 16:55:34.252 INFO [http-nio-8080-exec-2] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/mydb]

Noel Grandin

unread,
Nov 4, 2017, 8:55:50 AM11/4/17
to h2-da...@googlegroups.com
You need to shut h2 down properly and then that thread will also go away.
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Christian MICHON

unread,
Nov 4, 2017, 9:09:12 AM11/4/17
to H2 Database
Use a context listener for this closing H2 without stopping tomcat. Have a look at stackoverflow.com on how to do this with H2
Reply all
Reply to author
Forward
0 new messages