Hi,

I have a memory leak error in my tomcat log when I shutdown the server.
"The web application [/myApp] appears to have started a thread named 
[MVStore background writer nio:<path>/dbname.db] but has failed to stop it. 
This is very likely to create a memory leak."
I have a war deployed which uses a H2 database and added the DbStarter 
listener. I use a pool connection source (mahout) and double checked that I 
close all connections.

web.xml
<resource-ref>
    <res-ref-name>jdbc/dbname</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>                
</resource-ref>
...
<listener>
    <listener-class>org.h2.server.web.DbStarter</listener-class>
</listener>

context.xml
<Context crossContext="true">
    <Resource
           name="jdbc/dbname" auth="Container" type="javax.sql.DataSource"
         removeAbandoned="true" logAbandoned="true" maxActive="16"
         validationQuery="SELECT 1"
         username="user" password="password"
         driverClassName="org.h2.Driver"
         url="jdbc:h2:./dbname;"/>
</Context>

H2 version: 1.4.192, Tomcat version: 7.0.42

Anyone having an idea how to handle that issue? I also have this message 
for a timer but am not sure where it comes from.
The web application [/myApp] appears to have started a thread named 
[Timer-6] but has failed to stop it. This is very likely to create a memory 
leak. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to