Heap troubles with MySQL ConnectorJ
Just a quick note about a problem i had to face few days ago. After updating a System from mm.mysql version 2.0.14 to the current Connector/J, i recognized
by OOM of the JVM After a few days of uptime. Long story short, reason for that was a memleak caused by legacy code, that closed JDBC-ResultSets, but did not close the Statements, they come from.
While this was not a problem back then in 2.0.x-time, the current drivers won’t automatically release the resources. Of course, you’ll see this only if reusing the JDBC-Connection (otherwise, GC will save your world anyway).
This is the right time and place to mention
JProfiler , which is a great tool for spotting performance- as well as memory-flaws. If you did not test it already, you might want to give it a try. It helped us tracking this one done. I use it for a year now, and i’m very happy with it.