ActiveMQ 6.3 runs out of direct buffer memory under load
Issue
Under heavy load, with KahaDB message store, A-MQ 6.3 fails with messages about lack of direct buffer memory. A-MQ 6.2 handled the load with the same settings. The KahaDB settings include preallocationStrategy=zeros
.
Exceptions of the following form might be seen:
2016-10-13 06:59:53,726 | WARN | ActiveMQ Transport: tcp:///10.57.67.143:37979@61616 | XATransaction | tivemq.transaction.XATransaction 91 | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630187 | Store COMMIT FAILED:
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:693)[:1.8.0_101]
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)[:1.8.0_101]
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)[:1.8.0_101]
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)[:1.8.0_101]
at sun.nio.ch.IOUtil.write(IOUtil.java:58)[:1.8.0_101]
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:211)[:1.8.0_101]
at org.apache.activemq.store.kahadb.disk.journal.Journal.doPreallocationZeros(Journal.java:351)
at org.apache.activemq.store.kahadb.disk.journal.Journal.preallocateEntireJournalDataFile(Journal.java
...
Environment
- Red Hat JBoss Fuse
- 6.3 R 8 and earlier
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.