How can I identify connection leaks in wildlfly server

410 views Asked by At

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.

1

There are 1 answers

0
user13280169 On

Cached Connection Manager (ccm) with debug="true", e.g.

<cached-connection-manager debug="true" />

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: