powered by Jive Software

Increase Java Memory for openfire 3.6.3 on MAC OS

I saw this on one of the threads, but i think it refers to linux boxes.


Add a line like this in /etc/sysconfig/openfire

OPENFIRE_OPTS="-Xms256m -Xmx512m"


Anyone know where to put it on Mac machines?

I saw this for windows


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:


Can i use that for mac?

Custom Parameters

Advanced users may wish to pass in parameters to the Java virtual machine (VM) to customize the runtime environment of Openfire. If you installed via RPM, you can customize this by editing /etc/sysconfig/openfire and looking at the OPENFIRE_OPTS option. ** If you installed via .tar.gz, you will need to tweak your startup script to fit your needs.**

So i locate my startup script

58 ?? 0:00.01 /bin/bash /usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh

which has this line for startup.

/usr/bin/java -server -jar /usr/local/openfire/lib/startup.jar -Dopenfire.lib.dir=/usr/local/openfire/lib

where do i add the option for memory. only place can be in the java line… But what the hell do i put in there?


#!/bin/bash
export OPENFIRE_HOME=/usr/local/openfire
export JAVA_HOME=/Library/Java/Home

function shutdown()
{
date
echo "Shutting down Openfire"
kill -s TERM ps auxww | grep -v wrapper | awk '/openfire/ && !/awk/ {print $2}'
}

date
echo “Starting Openfire”

/usr/bin/java -server -jar “$OPENFIRE_HOME/lib/startup.jar” -Dopenfire.lib.dir=/usr/local/openfire/lib&

OPENFIRE_PID=ps auxww | grep -v wrapper | awk '/openfire/ && !/awk/ {print $2}'

allow any signal which would kill a process to stop Openfire

trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP

echo "Waiting for cat $OPENFIRE_PID"
wait cat $OPENFIRE_PID