Openfire 4.0.1 Java Memory issue

Hello everyone. I am having an issue with our Windows based Openfire server. I am posting this up because I have read thru the suggested solutions for this issue, but they have not worked.

We are using a Windows Server 2008 R2 Vitual machine. 64Bit OS and 4 GB of memory.

We have Openfire 4.0.1 installed and running on this machine. But it keeps crashing and eating up the CPU for some reason. When I log into the admin page. I noticed that the Java Memory is almost maxed out.

I have created the openfired.vmoptions ad openfire-service.vmoptions files. But it does not seem to help. May I have misread how to apply those files. For that reason I am hoping for some help here. Thanks

When you added the openfire-service.vmoptions file, does it not increase your java memory or does the increase not help?

It does not increase.

Are you sure it is openfire-service.vmoptions file and not the openfire-service.vmoptions.txt?

Are you using Openfire as a service?

What is the content of openfire-service.vmoptions?

Keith wrote:

I noticed that the Java Memory is almost maxed out.

This might be a normal behavior of JVM you have observed. It constantly eats up memory and then releases it. You can continuously refresh that page to see how it works that way. Of course, if it uses up 99% of memory, then it is not ok and correct vmoptions file may help.

Okay well here is what mine looks like. The only thing in the file is this:



It is saved as openfire-service.vmoptions. (make sure it does not save it as a .txt file)

Stop openfire service on the server. Place the file in the “bin” folder in the main openfire directory. Mine is c:/programfiles(x86)/openfire/bin/

Start openfire service again.

Did you do all of those steps and it is still not working?

I have done all those steps yes. But for some reason, it is not reflecting on the admin page.

It is always between 99.7 and 99.9 %. I am not sure why. (187 Bytes) (162 Bytes)

Well, that could be specific to your setup, your usage pattern, etc.

Can you copy that vmoptions file from your bin folder and attach it here (via the ‘Use advanced editor’)?

I have added the files on the thread.

openfired one is bad. Has only xmx setting in there. Although i don’t think it should affect the service, but it is safer to just delete it and restart the service. Also, in the openfire-service.vmoptions i would go with 512m for Xms. You are already running out of 256 MB of JVM, so no point of setting it as a min value, i think.

Ok. Deleted openfired. Adjusted openfire-service. Stopped and restarted openfire. But change still does not reflect? Should I reboot the server? I don’t understand why it is not seeing the file.

Keith wrote:

Stopped and restarted openfire.

By that you mean restarting Openfire service in services.msc? Rebooting the machine probably won’t change anything, but why not.

Well. That could certainly be the issue. Because there is no openfire service in the services list. I do see openfired.exe and openfire.exe in the Process list.

Yep. Stop the Openfire Launcher and quit it. Then install the service per instructions Openfire: Installation Guide (Windows Service). Then start the service and check JVM memory. Do not run it via launcher anymore.

1 Like

Thank you both very much for your help. Installing the service worked immediately!!! Thank you for your patience and help! Very much appreciated!

I now see the available memory has changed.

I have the Service installed but it never reads the openfired.vmoptions file settings for 1536m



Starting with the Openfire Launcher reads the 1536m but… then I have to keep the session open on the Server.

How do I get the Service to read the 1536m options? [it only starts with 256k]


  • that’s OK. I’m an idiot. I goddit now - after making the openfire-service.options file! duh!

Thanks for reading