I Have a Openfire Server 3.7.0 in a Windows 2008 Server with 100 Users /** 80 concurrents**
since some weeks ago I see a High Memory drain of my Server, 1 week ago I changed the Max Java Memory to** 1.5gb** because was always 100% of 1gb, Now I have 1.5gb of java memory and it’s **100% of consumption **
Announcement: Suffering from memory-related issues in Openfire? Read this!
Hide Details
Openfire up to and including version 3.6.4 (and looks like 3.7.0 too) suffers from a memory leak in its PEP component. If your Openfire server is crashing with OutOfMemoryExceptions, you might be having this problem.
As a workaround, you can disable PEP, by setting the Openfire property xmpp.pep.enabled to false.
More information can be found in this discussion: Openfire 3.6.4 memory leak with Empathy
Do you use an archiving plugin or something like this? What are the sizes of your files in the embedded-db folder? If they are >200 MB then you may have a problem with the size of database (it is held in memory completely)
Please make a copy of your embedded-db/openfire.script file (while Openfire is running). If you have unix tools available then you may want to execute “cat copy-of-openfire.script | cut -d’ ’ -f1,2,3 | uniq -c | sort -n” which should you return the most used tables at the end, eg:
…
900 INSERT INTO FPSESSIONMETADATA
3000 INSERT INTO OFROSTERGROUPS
5000 INSERT INTO OFROSTER
Print out the number of lines, and the number of lines without message archive data:
If you don’t have unix tools find an editor which allows to open the file and then search for "INSERT INTO ". You may find quite a lot of insert statements for the tables “ofConversation” and “ofmessagearchive”. After removing them the file size should be very small.
If this is the case then you may either want to remove the plugin and delete the tables or migrate the data to another database.