Bouncing openfire service nightly

I’m trying to figure out how to stop and restart the openfire service nightly. when I do a /etc/init.d/openfire stop it doesn’t always come down and the times it does come down it takes a while. I’ve tried stopping the service, sleeping for 15minutes, then starting, the service just stays up. I don’t see a pid file I can kill to drop the service (I’d prefer not to do this anyways).

The reason I would like to do this is yesterday the server went crazy and was spewing “ran out java heap memory” yesterday and needed a reboot. (BTW we have a max heap size of 1024mb). I believe this was fluke but I would like to start each day fresh anyways.

thoughts?

sbrissen,

Others may not agree, but I don’t think it is a good practice to reboot your Openfire once per day, this isn’t windows afterall

Lets try to figure out why you ran out of heap space. What OS are you on? What is the exact setting you have for memory allocation?

daryl

I wouldn’t be rebooting the server, just the service. This is something we used to do with our old chat server. Doing so would also force it to grab the newest settings and clear out some cache.

OS: Centos 5

java setting: -Xms512m -Xmx1024m

sbriessen,

I was using the term ‘reboot’ loosely. Given your logic, you should reboot your server too so that it 'grabs the newest settings and clear out some cache"… Openfire will take the newest setting changes you make as they happen. Your cache is a good thing and helps performance.

Do any of the log files contain more information about this heap error?

daryl

The nightly bounce is working for me now. I have a cron job that stops the service waits a length of time then starts up and its working.

Thanks for the help