My wildfly server loses connection to database very frequently. How can I identify connection leaks to database. My application stops working after losing connection to database and not able to reconnect again. I need to restart again. Please suggest any way to identify the leaks. Thanks in advance for help.
I have tried using cache connection manager and reading jmx console values of active count etc.
Cached Connection Manager (ccm) with
debug="true", e.g.Should make it so that WildFly/JBoss should close connections for you and log a stacktrace in the server log each time it does, telling you exactly where in your connection leak is when that code path is executed.
Here are a few references: