When this happens again you need to take a thread dump, I recommend 3 or 4 spaced a few seconds apart. Examining the running threads should tell you where in the code the issue is.
When you say that memory usage goes from 250MB to 1024MB, what tool are you using to determine this?
Thanks for the response PeterJ.
I am monitoring the TaskManager. Java.exe would spike from 250mb to 1GB in a matter of few seconds. Once that happens, I could not really use JMX-Console anymore to lookat or dump the threads.
Is there any other easy way to take a thread dump.?
Type CTRL-C in the command prompt window from which you started JBoss AS. If you are running it as a service, temporarily run from a command prompt so that you can get the thread dump.
You can also use JConsole or VisualVM (they come with the JDK) to get a thread dump.
Peter, Once i get a thread dump, whats next? What should I look for in the thread dump? Appreciate your help.
There will be a stack trace for each thread. This will give you and idea of what each thread is doing. Ignore threads waiting on the http queue, instead look for threads running you app code. Then in the next thread dump, look at the same threads to see what they are doing. Threads that appear to be in the same code for all the dumps. and the code they are in, is where the problem is at.