"java.lang.OutOfMemoryError: Direct buffer memory” exception is thrown by Netty component
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.0.7
Issue
-
Problem occurs, after several hours of continuous send/receive messages to ActiveMQ artemins, at moderate rate, about 140 messages per second. Messages are read in timely matter. We don’t see any WARNs about paging in logs, before exception. We use mostly default settings for Artemins. max-size-bytes is set to 10 MB.
-
After this exception, existing connections are not closed. Already connected clients, no longer receive messages, and are not forced to reconnect. This is our primary concern. In “Messaging statistics” in WebConsole “Server: Standalone Server Monitor: Subsystems Subsystem: Messaging – ActiveMQ”, “Consumer Count” is 0 after exception. Clients that connect after exception, can read messages. Sending new messages also works.
Resolution
- Set batch-delay to 0 in http-connector.
<http-connector name="connector-remote-dispatcher" endpoint="http-acceptor" socket-binding="messaging-remote-dispatcher">
<param name="batch-delay" value="0"/>
</http-connector>
Root Cause
Content from issues.jboss.org is not included.JBEAP-6398
Content from issues.jboss.org is not included.ENTMQBR-658
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.