I'm running a typical EJB application on the following production enviroment:
- Linux 2.4.18-24.7.x #1
- java version "1.4.2_02"
- Jboss 3.2.2
The application starts up fine, with CPU usage hovering around 6%. But occasionally, one of the java process would suck up about 90% of the CPU but continues to operate.
Same application installed on a newer linux kernel with same java and jboss java version, went through similar testing and never once get into that situation.
So.. my question is: how can I debug that application on the production server to see which thread is the culprit?
I've tried Eclipse remote debugging feature, it shows all the running thread but I can't seem to see which thread is hogging the CPU and what it is doing.
Any suggestions/comments are very much appreciated. Thanks!
-Kai
You can do a kill -3 on the JBoss process to get a thread dump. You can also try using jmemprof (freeware) or JProbe to try and trap and debug the situation.