[jboss-jira] [JBoss JIRA] (WFLY-10531) Wildfly leaks ActiveMQ connections
Jan-Willem Gmelig Meyling (JIRA)
issues at jboss.org
Mon Oct 1 12:12:03 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13640866#comment-13640866 ]
Jan-Willem Gmelig Meyling edited comment on WFLY-10531 at 10/1/18 12:11 PM:
----------------------------------------------------------------------------
After some looking into WFLY-9501, I think the implementation causes an regression that does not close a JMS context at all if it the delegate is not first accessed through a method in tranaction state Active. Ie. any callee in transaction status Committing, NotActive, etc.etc. will not register the cleanUpListener (see: https://github.com/JiriOndrusek/wildfly/blob/6355f48234b1b976230c3c529d5aa22eb0b3e1f2/messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/deployment/injection/InjectedJMSContext.java#L85-L112) , and the context will also not be closed with the destroyal of the bean due to the removal of the PreDestroy annotation on : https://github.com/JiriOndrusek/wildfly/commit/6355f48234b1b976230c3c529d5aa22eb0b3e1f2#diff-2af8c252ced3a58850005d4f1c7fb661L69 . I'm also not sure how the current transaction check handles the slightly different EJB transactions.
[~jondruse] can you please elaborate on your implementation?
was (Author: jwgmeligmeyling):
After some looking into WFLY-9501, I think the implementation causes an regression that does not close a JMS context at all if it the delegate is not first accessed through a method in tranaction state Active. Ie. any callee in transaction status Committing, NotActive, etc.etc. will not register the cleanUpListener (see: https://github.com/JiriOndrusek/wildfly/blob/6355f48234b1b976230c3c529d5aa22eb0b3e1f2/messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/deployment/injection/InjectedJMSContext.java#L85-L112) , and the context will also not be closed with the destroyal of the bean due to the removal of the PreDestroy annotation on : https://github.com/JiriOndrusek/wildfly/commit/6355f48234b1b976230c3c529d5aa22eb0b3e1f2#diff-2af8c252ced3a58850005d4f1c7fb661L69
[~jondruse] can you please elaborate on your implementation?
> Wildfly leaks ActiveMQ connections
> ----------------------------------
>
> Key: WFLY-10531
> URL: https://issues.jboss.org/browse/WFLY-10531
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 13.0.0.Final
> Environment: openjdk 8 / openjdk 9, Linux
> Reporter: Marcel Šebek
> Assignee: Jeff Mesnil
> Attachments: WFLY-10531-ear-1.0.ear, WFLY10531.zip
>
>
> After upgrading our application from wildfly 12 to 13, the app started to crash after a while (hours, days, depending on circumstances). It crashes on
> IJ000453: Unable to get managed connection for java:/JmsXA
> and other errors (it simply cannot perform all the jobs it contains). I found that when shutting down the server which has been running for a while, I can see a bunch of these messages in the log:
> WARN [org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri] (ServerService Thread Pool -- 117) [:::] IJ000615: Destroying active connection in pool: ActiveMQConnectionDefinition (org.apache.activemq.artemis.ra.ActiveMQRAManagedConnection at 2f37f69)
> Bascially, the longer the server was running, more of these messages are shown. I cannot find a way how to reproduce the issue. When the server runs for short time but with some load, no connection is leaked (or just one, rarely). On the other side, it leaks connections even without any particularly high load (just a few requests and @Schedule jobs) when running for longer time.
> It may also be a bug in our application, which just happen to have more serious impact with the new wildfly version.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list