When it "hangs", what is the CPU usage?
Have you taken any thread dumps to see what the threads are doing? Usually, if the CPU usage is high, you can take 2 or 3 thread dumps about 15 seconds apart and compare them - what you are looking for is threads that are not waiting for input but rather are in the middle of processing. Often you can find infinite loops in yoy code that way.
On the other hand, if CPU usage is low, then that means that some threads are hung waiting for outside repsonses. In that case look for threads that have large stack traces and are waiting for something. The same thing can happen in a deadlock situation with many threads waiting on the same object or set of objects.