Hey all,
I've got a small project ahead of me; there is an application that is not closing a connection, somewhere, somehow, it isn't clear where. We know it is happening because slowly the connections in the database will ramp up. I've set the max connections in
tomcat so after 5 it will refuse more connections and it appears to be a situation where someone is actually closing the connection but not wrapping it in a try/catch because if I hammer a few select pages eventually I'll start to sneak in a few connections that refuse to close. The problem is that these pages do some serious work (not just crud), so lots of different database connections at different times.
What's the best way to debug a problem like this? Any special monitoring tools? Any special logging tools? I know it's a difficult problem because what is a valid unclosed connection?
I'm looking for a log, something like this:
That way I could simply see after running the app where a connection was opened and not closed. Anything like this? Any ideas/help would be appreciated