we had an OutOfMemoryError in and are currently investigating the problem
10:38:52,521 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
10:38:52,524 ERROR [STDERR] at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)
10:38:52,524 ERROR [STDERR] at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)
10:38:52,525 ERROR [STDERR] at org.hornetq.core.journal.impl.NIOSequentialFile.fill(NIOSequentialFile.java:112)
10:38:52,525 ERROR [STDERR] at org.hornetq.core.journal.impl.JournalFilesRepository.createFile(JournalFilesRepository.java:473)
10:38:52,525 ERROR [STDERR] at org.hornetq.core.journal.impl.JournalFilesRepository.takeFile(JournalFilesRepository.java:419)
10:38:52,528 ERROR [STDERR] at org.hornetq.core.journal.impl.JournalFilesRepository.pushOpenedFile(JournalFilesRepository.java:386)
10:38:52,530 ERROR [STDERR] at org.hornetq.core.journal.impl.JournalFilesRepository$1.run(JournalFilesRepository.java:342)
10:38:52,531 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:38:52,531 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:38:52,532 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)
maybe this is related to a big journal of about 800MB which we cannot explain, as we do not see any pending messages in any of the queues/topics
However, we used org.hornetq.core.persistence.impl.journal.PrintData to show the content of the journal and can see about 100000 messages in the journal. If I interpret the data correct, the messages are for (2) topic subscriptions, which are no longer subscribed, resp. we cannot see any subscription via the jmx management. As we cannot see any subscriptions, we cannot delete the messages.
A solution is to restart hornetq and drop the journal. But you know, we will loose all other messages also (we can now live with the loss, but later on this is a problem).
So are there more sophisticated methods
- to check if there are pending messages on the subscription
- the cleanup the journal resp. to remove the messages
we are using hornet 2.2.2 with jboss 5.1. Only hornetq is running on jboss...