OutOfMemoryError on server start with "big" journal
bodrin Dec 22, 2010 9:45 AMHi,
I have found some tests here in the forum and played with them. I have a durable queue with producer (and consumer, but not included here). So I have sent some messages and then and I got OutOfMemoryError when trying to start the server .. see below.
I have turned on pagination and can't think of any other reason why this is happening, so I'm sending to you the test (two classes) and the bindings,journal and paging directories, because I have not found the exact way to reproduce it, but may be you can analyse the DB if you are interested
Best regards,
bodrin
<quote>
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(Unknown Source)
at java.nio.ByteBuffer.allocate(Unknown Source)
at org.hornetq.core.journal.impl.NIOSequentialFileFactory.newBuffer(NIOSequentialFileFactory.java:80)
at org.hornetq.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:453)
at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1760)
at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1409)
at org.hornetq.core.persistence.impl.journal.JournalStorageManager.loadMessageJournal(JournalStorageManager.java:777)
at org.hornetq.core.server.impl.HornetQServerImpl.loadJournals(HornetQServerImpl.java:1220)
at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1070)
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:313)
at Test.<init>(Test.java:69)
at Test.main(Test.java:232)
java.lang.Exception: Java heap space
at org.hornetq.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:764)
at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1760)
at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1409)
at org.hornetq.core.persistence.impl.journal.JournalStorageManager.loadMessageJournal(JournalStorageManager.java:777)
at org.hornetq.core.server.impl.HornetQServerImpl.loadJournals(HornetQServerImpl.java:1220)
at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1070)
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:313)
at Test.<init>(Test.java:69)
at Test.main(Test.java:232)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(Unknown Source)
at java.nio.ByteBuffer.allocate(Unknown Source)
at org.hornetq.core.journal.impl.NIOSequentialFileFactory.newBuffer(NIOSequentialFileFactory.java:80)
at org.hornetq.core.journal.impl.JournalImpl.readJournalFile(JournalImpl.java:453)
... 8 more
</quote>
-
hq_test.zip 2.0 MB