JMS session, connection, and remoting invokers accumulating in JBoss heap
Environment
- JBoss Enterprise Application Platform (EAP) 5
- JMS
Issue
- Our heap usage is slowly and continually growing until an OutOfMemoryError. The heap dump shows accumulation in the following objects:
- org.jboss.remoting.Client
- org.jboss.remoting.InvocationRequest
- org.jboss.remoting.invocation.InternalInvocation
- org.jboss.jms.server.endpoint.ServerSessionEndpoint
- org.jboss.jms.server.endpoint.advised.SessionAdvised
- org.jboss.remoting.ConnectionNotifier
- org.jboss.jms.server.endpoint.ServerConnectionEndpoint
- org.jboss.jms.server.endpoint.advised.ConnectionAdvised
- org.jboss.remoting.InvokerLocator
- org.jboss.remoting.transport.local.LocalClientInvoker
- Invokerorg.jboss.remoting.transport.local.LocalServerInvoker
Resolution
- Ensure JMS sessions and connections are always closed when done with. Ideally these should be called within a finally block so that any prior exceptions do not interrupt code past this call.
Root Cause
- This can happen if you do not close your JMS sessions/connections.
Diagnostic Steps
-
Analzying the dumps in MAT, run the following OQL queries to determine if objects have been closed:
SELECT toString(s.started) FROM org.jboss.remoting.transport.local.LocalServerInvoker s SELECT toString(s.closed) FROM org.jboss.jms.server.endpoint.ServerConnectionEndpoint s
Components
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.