Originally posted in response to a server error , where it was suggested to ask this question here.
We use JBoss to run our two WARs. One is our web application, the other is our web service. The web application accesses the database on another machine and makes requests to the web service. The web service makes JMS requests to other machines, aggregates the data, and returns it.
At our largest client, about once a month, the JBoss Java process takes up 100% of all processors. There are 8 processors on the JBoss machine. Our web application is still available during this time, but it takes about 3 minutes to load the pages. Restarting JBoss restores everything to its normal level.
The database machine and all the other machines are beautiful, only the JBoss-powered machine affects it. Memory usage is normal. Network usage is normal. There are no error messages in JBoss logs.
I installed the test environment as close as possible to the working environment of the client, and I conducted load testing with a whole number of concurrent users. I did not get my test environment to replicate the problem.
Where do we go next? How can we narrow the problem?
Currently, the only thing we have is to wait until a problem arises in the production process on its own, and then do some debugging to determine the cause. So far, people have just restarted JBoss when a problem occurs to minimize downtime. The next time this happens, they will interest the developer. The question is, when this happens, what can be done to determine the cause?
We could configure a separate instance of JBoss in the same field and install the web application separately from the web service. Thus, when the following problem arises, we will find out what the WAR problem is (provided that this is our code). This does not narrow it, though.
Should I enable remote JMX? Thus, the next time a problem occurs, I can connect to VisualVM and see which threads the processor takes and what the hell they are doing. However, is there a significant side to enabling remote JMX in a production environment?
Is there any other way to see which threads there is a processor and get a stack to see what they do?
Any other ideas?
Thanks!