WildFly dump leak connections

I am trying to reset leaked connections managed by a MySQL data source in WildFly 10.1, but I cannot find the leak file or leak dump.

Why is the leaks.txt file not created? And also, where should I look for a file?

Procedure

I registered a leaky connection pool in the standalone.bat file:

 "JAVA_OPTS=%JAVA_OPTS% -Dironjacamar.mcp=org.jboss.jca.core.connectionmanager.pool.mcp.LeakDumperManagedConnectionPool -Dironjacamar.leaklog=leaks.txt" 

I can confirm that the properties are set in WildFly, as they appear in the log:

 JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Dironjacamar.mcp=org.jboss.jca.core.connectionmanager.pool.mcp.LeakDumperManagedConnectionPool -Dironjacamar.leaklog=leaks.txt" 

After that, I will warm some connections in my mock application to generate data. Then I run the CLI command, dropping all connections, getting a positive response:

 [ standalone@localhost :9990 /] /subsystem=datasources/data-source=mysql-ds:flush-all-connection-in-pool {"outcome" => "success"} 

But I can not find the leaks.txt file anywhere.

I am using this article as well as the IronJacamar leak documentation as a reference.

The leak detector pool is configured using the ironjacamar.mcp system property with value

org.jboss.jca.core.connectionmanager.pool.mcp.LeakDumperManagedConnectionPool

This configuration applies to all connection pools used by IronJacamar.

The system property ironjacamar.leaklog can be used for leakage and is uploaded to a special file separately from the logging settings.

Example

-Dironjacamar.mcp=org.jboss.jca.core.connectionmanager.pool.mcp.LeakDumperManagedConnectionPool -Dironjacamar.leaklog=leaks.txt

Update

Topic 969369 , created by the JBoss forum, so they can help with it.

JBJCA-1360 error reported .

+7
java wildfly wildfly-10 ironjacamar
source share
1 answer

Topic 969369 , created by the JBoss forum, so they can help with it.

Bypass

There is an alternative approach to connecting log leaks, but I think it should not be used as a definitive answer to this question.

A workaround for this is to enable debug and error modes true for the JCA subsystem (it seems that a server reboot is not required).

 /subsystem=jca/cached-connection-manager=cached-connection-manager:write-attribute(name=debug, value=true) /subsystem=jca/cached-connection-manager=cached-connection-manager:write-attribute(name=error, value=true) 

You can check the logs as the server will throw exceptions, pointing to a stack that will help you find leaks. It is not so clean, but it helped us find where the problem was in our code.

0
source share

All Articles