Broker's POD goes on OutOfMemoryError at startup
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- Red Hat AMQ Broker (AMQ Broker)
- 7.10
Issue
- Broker's POD goes on OutOfMemoryError at startup
Resolution
There is not anyone for all solutions. Can be required a disaster recovery practice (restore to a new broker's cluster) or it is enought clean-up of the message store (if losing all messages is acceptable).
Root Cause
It happens when the global-max-sizevalue has been bigger than the broker's available memory letting the broker to create a message journal too big to be loaded into memory at the startup.
Diagnostic Steps
In the broker's POD logs the last error is AMQ224097: Failed to start server: java.lang.OutOfMemoryError.
ERROR [org.apache.activemq.artemis.core.server] AMQ224097: Failed to start server: java.lang.OutOfMemoryError: Java heap space
at org.apache.activemq.artemis.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:898) [artemis-journal-2.21.0.redhat-00030.jar:2.21.0.redhat-00030]
at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:2136) [artemis-journal-2.21.0.redhat-00030.jar:2.21.0.redhat-00030]
at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:2429) [artemis-journal-2.21.0.redhat-00030.jar:2.21.0.redhat-00030]
at org.apache.activemq.artemis.core.journal.impl.JournalImpl.load(JournalImpl.java:1739) [artemis-journal-2.21.0.redhat-00030.jar:2.21.0.redhat-00030]
at org.apache.activemq.artemis.core.journal.Journal.load(Journal.java:278) [artemis-journal-2.21.0.redhat-00030.jar:2.21.0.redhat-00030]
at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.loadMessageJournal(AbstractJournalStorageManager.java:911) [artemis-server-2.21.0.redhat-00030.jar:2.21.0.redhat-00030]
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.
Comments