OPENFIRE server Crashes with Java Heap Memory Leak

Once in the couple of month my Openfire (V 4.1.5) server crashes with OUt of MEMORY Error for Java Heap Space. Will it be fixed the the newer version also let us know if there are any action to be taken from our side plz?

Without more information, it is impossible to tell what is causing this. Memory starvation can have all kinds of causes. Your server might be configured to use exactly the amount of memory available on the system (which doesn’t leave room), you might be experiencing a memory leak, or your system is occasionally spiking in resource usage, for example.

If you have any kind of resource usage monitoring, it would be good to investigate if you see memory utilisation grow over time (and drop back again after a restart of Openfire). If that’s not the case, then you probably want to configure Openfire to use more of the RAM provided by the hardware. If you do suffer from a memory leak, then creating and analyzing a heap dump will likely give you some answers.

TYSM for the quick reply, can you be more specific how I should set the java heap for the openfire on Windows server 2012 also how to set up more RAM for Openfire ? plz?

You can control the maximum amount of memory that Openfire can acquire from the operating system by using Xmx parameters, for example in the vmoptions file. If you search around a bit on this forum, you will find plenty of references.

If your server does not have enough RAM then that’s a matter for system administrators. If the server is virtual, then that might be configurable. If it is not, then physical memory modules might need to be added.

1 Like

Dear champions,

Changed the parameters from 1 GB to 4GB and min kept 512 of the service but it failed to start OPENFIRE service, it seems max xmx size is allowed to 1GB only. I think only upgrade of the openfire version might be the solution.

That sounds like you are running on either a 32 bit operating system and/or using a 32 bit JRE. You would likely want to be using 64 bit versions of both these days.

1 Like