Java Memory

I’m on Openfire 3.4.4 and my java memory is at 88.3%. 55.89mb of 63.31 mb.

What uses memory? Avatars? Conversation history? logs?

If it gets full will there be problems?

I have 40 users on Spark client.

That seems like a very small allocation of memory to openfire. I would increase this. Read the install doc in the the documentation directory in the openfire directory for details.

Ok. Since I don’t know what uses that memory I don’t know how much should be allocated based on my environment. I found this in the documentation and I did it. I’m assuming I have to restart the openfire service for it to take effect?

Custom Parameters

Advanced users may wish to pass in parameters to the Java virtual machine (VM) to customize the runtime environment of Openfire. You can do this by creating vmoptions files in the bin/ directory of your Openfire installation. For the Windows service, you’d create a new text file called openfire-service.vmoptions. Each parameter to the VM should be on a new line of the file. For example, to set the minimum heap size to 512 MB and max VM heap size to 1024 MB, you’d use:


ok that didn’t work (i restarted the openfire service)

the java memory is down to 66.8% now (maybe its b/c people are signing off b/c of end of day)

i’m starting to suspect it could be those avatars

How much memory does show java has now? Is it still 64MB.

yes, still 64mb

Was any resolution reached on this? I to am interested in bumping up our memory allocation. Does this openfire service need to be restarted for these changes to take effect? I am guessing so since its a startup variable for java.


Good question. If you are running openfire as a windows service you need to use a file like I have attached. Feel free to edit for your server. The file goes in your openfire bin directory.

Just dropped that file in the bin directory, made a change on the memory consumption and restarted the services. Shows up as expected in the admin web page. So in other words if Openfire is configured as a service, this file will work.


I’m on Openfire 3.4.4 and my java memory is at 88.3%. 55.89mb of 63.31 mb.

What uses memory? Avatars? Conversation history? logs?

Java uses the memory if you have it. If Java runs out of memory it begins with clean up…so this 55.89 Mb are not the real memory usage.

I have 40 users on Spark client.

For 40 users 64 Mb should be sufficient. If have more than 200 concurrent users with 256 Mb.

If you have a Linux server, this .vmoptions file doesn’t work. But you can add this parameters in the start script /opt/openfire/bin/extra/openfired and start openfire with this script.

I’m wondering if someone could assist me with increasing the java memory size on a debian/ubuntu based distribution? the openfire file layout appears to be a good bit different from what you guys are describing. (or I’ve lost my mind)

This is a response to my own question. The answer I was looking for is here:

I needed to apply the patch int hat thread since I was running a version prior to 3.4.5 and change the /etc/defaut/openfire file.

This was exactly what I needed. Thanks!

getting erorr message daily


Exception in thread “timer-openfire” java.lang.OutOfMemoryError: unable to create new native thread

at java.lang.Thread.start0(Native Method)

at java.lang.Thread.start(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)

at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.jivesoftware.util.TaskEngine$

at java.util.TimerThread.mainLoop(Unknown Source)

at Source)