powered by Jive Software

OutOfMemoryError (Java heap space) @ Openfire 3.3.2

Hi all,

I’m running Openfire 3.3.2 with the embedded DB on Windows Server 2003.

The problem I’m having is that after a while the openfired.exe process will just start to “memory leak?” and increase the memory usuage to 450mb+ and then shutdown with this message:

+Logging Error: Unknown error writing event.+

+java.lang.OutOfMemoryError: Java heap space+

+Exception in thread “pool-2-thread-2” java.lang.OutOfMemoryError: Java heap space+

+45851390 client-10 WARN org.jivesoftware.openfire.nio.ClientConnectionHandler - Unexpected exception from exceptionCaught handler.+

+java.lang.OutOfMemoryError: Java heap space+

+Logging Error: Unknown error writing event.+

+java.lang.OutOfMemoryError: Java heap space+

+java.lang.OutOfMemoryError: Java heap space+

+Exception in thread “Auditor” java.util.MissingResourceException: Can’t find bundle for base name openfire_i18n, locale en+

+* at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)*+

    • at java.util.ResourceBundle.getBundleImpl(Unknown Source)*+
    • at java.util.ResourceBundle.getBundle(Unknown Source)*+
    • at org.jivesoftware.util.LocaleUtils.getLocalizedString(LocaleUtils.java:351)*+
    • at org.jivesoftware.openfire.audit.spi.AuditorImpl$SaveQueuedPacketsTask.run(Audit orImpl.java:334)*+
    • at java.util.TimerThread.mainLoop(Unknown Source)*+
    • at java.util.TimerThread.run(Unknown Source)*+

Caused by: java.lang.OutOfMemoryError: Java heap space

Exception in thread “Update Manager” java.lang.OutOfMemoryError: Java heap space

This usually happens when the server is more busy after a day or two, but not more than 5 channels with 10 active users.

Any ideas on what’s going on and if there’s a fix for this? Any help is appreciated.



Going to this thread may solve your issue. http://www.igniterealtime.org/community/thread/28207?tstart=0

Hope it helps

Hmm, I don’t think increasing the heap size will help permanently, because the memory usage will still continue to rise.

Is this a known Openfire bug or something system/setup specific?

I don’t think it’s a bug with openfire

Hmm, so why does the memory usage icrease so much with just 5-10 users and 5 channels?


did you install any plugins?

Are you logging the communications with the audit feature or a plugin?


I just use the normal Openfire 3.3.2 install and setup, no plugins.

How do I check what type of logging the server’s using?


without plugins this should be the internal auditor thread. The old gateway plugin had some OOM issues but this does not seem to be the case. With five users it should be possible to run Openfire with -Xmx32m.

So you may want to use jmap or set "-XX:HeapDumpOnOutOfMemoryError" if the JVM supports this to get a (binary) heap dump file which can then be analyzed. And set Xmx to a low value (64 MB) so the heap dump file will stay small. One can us jhat or tools like https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Java/JavaMemory+Analysis to analyze the dump. Gato (the main developer) should also have some tools to analyze the dump file.