powered by Jive Software

Openfire is causing java to use up all of my processors

I am running openfire 3.3.2 for MacOS 10.4.10 on a PowerMac G5 2.5ghtz with java 1.5.0_07 installed. It seems that after a few days java seems to eat up all of the unused processor time forcing my cpu into crawl speed. I then stop/start openfire which returns the java resource to function normally. Just when i thought this was a one time occurance it happened again today. Except I noticed something different this time. A few days ago i installed a bandwidth monitoring menu item called iStats. It was working fine except yesterday i noticed that it had my upload/download listed at ~140k/sec baically insync with my cpu being idle. I thought it was a bug or that some program/service on my computer was hogging up the bandwidth. I started stopping services and programs other than openfire but got no change. I even turned off certain services in openfire such as media proxy etc. It made no change in the bandwidth being used I then just ruled it as a bug in the stat software and chose to ignore it seeing as it’ll correct itself upon restart of the cpu. So today i had the openfire bug again. I ran the stop/start commands and noticed that after doing so the network monitor showed 0-4k/sec upon idle. Any fixes and or suggestions would be appreciated.

My java version:

java java version “1.5.0_07”

Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)

Java HotSpot™ Client VM (build 1.5.0_07-87, mixed mode, sharing)

Hi,

I’m not sure whether MAC supports SIGSTOP (which can not be ignored) and SIGCONT but running on PowerPC this could be the case. This should allow you to freeze the Openfire process for some seconds or even longer, depending on the delay between SIGSTOP and SIGCONT - so you could check if Openfire is using the bandwidth without the need to restart it. TCP/IP does allow you to stop the process for some seconds without lost connections.

If Openfire is consuming again a lot of CPU cycles you may want to create a Java core file by sending a -3 signal to Openfire.

LG

thanks for the fast feedback but how does one send a -3 signal to openfire?

Hi,

first one may want to get PID of Openfire, for example with

ps -ef|grep java

So if you have the PID and the PID is 123456 you may want to execute

kill -3 123456

to create a Java core file. It will be written to STDERR, so if you are using the default settings I assume that it’s written to nohup.out.

You may want to test this when nobody is online, so you know what to do when the problem occurs again.

If you have a signals.h file you may find there the numbers for SIGSTOP or SIGHALT and SIGCONT (should be -17 and -19 or something like this) - so you should be able to stop the process for a few seconds with

kill -17 123456 && sleep 10 && kill -19 123456

LG