How do I mitigate Connection leak triggered for connection com.mysql.jdbc.JDBC4Connection@11d08960, How do I mitigate Connection leak triggered for connection com.mysql.jdbc.JDBC4Connection@11d08960, mysql mysql

How do I mitigate Connection leak triggered for connection com.mysql.jdbc.JDBC4Connection@11d08960,


As I have reviewed my codes over and over again. I came to realize that I was barking at the wrong tree, Seems like hikari is very reliable when it comes to connection leak. The problem is when amazon aws ec2 instance is stealing some of my cpu and is even greater than what i thought. So after the cpu goes up 99%, Connection leak is detected even though my codes clearly closed it in finally block. So the problem lies with the machine.

I thank you for all who participated to answer.


walk thru the code with 'stack trace' and it would lead you to un-closed connection or the connection that takes longer than threshold.