I discovered that the MySql driver has a memory leak. I use it with tomcat in a connection pool setup. Loads of JDBCResultSet and StatementImpl objects are in the heap. Setting the maxAge in the datasource configuration (context.xml) in tomcat helped.