Openfire Increasing Java Memory Limits Debian/Ubuntu

Openfire ships with a 64Meg  JVM limit which is fine for testing purposes but you may find that you are using it all up.    I went round the forums a few times and found conflicting advice.

Anyhoo the instructions were close but seemed to give one massive red-herring which was they kept talking about OPENFIRE_OPTS in /etc/defaults/openfire which did not exist,   add it your self and Openfire will ignore it.    Where the data needs to go is in DEAMON_OPTS.

To cut a long story short you need to make /etc/defaults/openfire look like :

# Defaults for openfire initscript
# sourced by /etc/init.d/openfire
# installed at /etc/default/openfire by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Additional options that are passed to the Daemon.
DAEMON_OPTS=”-Xms256m -Xmx512m”

This will tell the JRE to use a minimum of 256Meg RAM and limit it to 512Meg.

Hope this helps 🙂

A quick note on RedHat x64 from Mike (Hi Mike 🙂 )
(slightly edited from an Openfire conversation for clarity and so it makes sense without the other bits!)

you said that on Ubuntu the default OPENFIRE_OPTS didn’t work and you had to change it to DAEMON_OPTS, OPENFIRE_OPTS works fine on CentOS 6.0 x64

also

I had to add libldb.i686 for openfire to work on CentOS-64 bit. 32-bit was fine, just the 64-bit version required it

Cheers Mike,  so just leave it alone for CentOS but install libldb.i686 if you are running the 64 bit version.