3.5.2 Java Memory

Ok, ive read and read and read and cannot find where, in my Openfire installation, to change the Java Memory. Its installed under MacOS 10.5.4 and no matter how hard i look i cant find where to ad the -xms stuff at… Please help. I have a 64mb cap and i have over 300 users to deal with…grrrr…

http://www.igniterealtime.org/community/click.jspa?searchID=437420&objectType=2& objectID=158379

I got the answer out of there. But I had to edit the sysconfig file. Not sure if its there on Mac

Ive read thru that and still cannot find the correct file to edit or the correct place to create the needed file. Any other help?

on the mac server is there an /etc/sysconfig directory? inside that dir is there a file named openfire?

#Openfire java runtime memory size.
#added Aug 9 2008
OPENFIRE_OPTS="-Xms256m -Xmx512m"

thats the only line not commented in my on a linux server. then a server restart and bam more java memory.

No, Openfire is running from

/usr/local/openfire

Here is the contents of the openfire installation folder…

In the openfire install doc there is a paragraph titled

Custom Parameters

Instructions are in there.

Since mac doesnt have the sysconfig dir in /etc I would try the vmoptions file next. Unless you want to fiddle with the /etc folder and see if you can fake it. I just don’t know if the mac build would try looking for /etc/sysconfig/openfire with out having a mac server to play with.

I spent a few hours thismorning, but I figured it out.

First, OS X doesn’t use sysconfig because it launches daemons via launchctl, which needs and an associated plist file.

Here’s what you need to do:

System Preferences > OpenFire > Stop Server (It’s important the server stops this way, cleanly)

Open terminal, sudo -s into root

nano /Library/LaunchDaemons/org.jivesoftware.openfire.plist

Ok, now look for

OPENFIRE_HOME

/usr/local/openfire
under that add this:

OPENFIRE_OPTS

-Xms256m -Xmx1024m

You can set those settings to whatever you’d like, now save the file (ctrl+x > y)

This is where things get tricky, on Windows/Unix, you’re done, you just restart the server and it’s good to go.

I’m not sure if this was a mistake, or intentional, however it doesn’t look like OpenFire actually uses /usr/local/openfire/bin/openfire.sh to start, instead it uses this file: nano /usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh

That’s where the problem truly is, you need to edit that file:

nano /usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh

Look for:

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

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

I think this might be a bug in OpenFire that the folks at Ignite should take a look at.

Either way, save that (ctrl + x > y), go back to System Preferences > OpenFire, and start the server.

You should now be good to go!

That did it!! thanks guys!!

This did not work for me, not sure what I’m doing wrong. Followed your instructions twice & every time the service refuses to run after I edit these.

I’m running 3.6.0a