Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an installation of OpenSSO running on Glassfish. Everything is pretty much stock with as little configuration as possible to get the system working. I've started running into issues where the server will stop responding. It will accept requests but hang on the responses. After twenty minutes or so all of the requests complete, lightning fast, and everything is back to normal. Sadly, the logs don't show anything out of the ordinary that would be causing this.

What I am looking for is a general strategy. How would you go about diagnosing and resolving issues like these on Java Application servers?

Thanks!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Here are some general tips for diagnosing Java issues.

  • Recent JDKs ship with VisualVM. You can attach this to a running JVM instance to monitor thread and memory usage.
  • If you are on Linux you could use kill -3 to get a thread dump and look for deadlocks using using Thread Dump Analyzer
  • Look into what information Glassfish may expose via JMX. You can then use JConsole to attach to the process and view the JMX information at runtime.
  • You mention that the logs don't show anything. If this is a recurring issue may you should increase the log level.
share|improve this answer
    
jstack does the same thing as kill -3 and should work on Windows. We tend to pull out a thread stack as our debug tool of choice in such situations. It helps us discover if all or most of the threads are doing the same thing. You might find they're all reading from the database or they're locked waiting on some other resource. –  David Pashley Jun 6 '09 at 5:09
    
I like this answer and it has been helpful. (Although I have yet to resolve the original issue.) I was hoping for something a little more like a procedure than a collection of tips and I'm actually really surprised that there hasn't been any more posted answers. Thank you again and I will accept this answer. –  tremoloqui Jun 10 '09 at 16:08

I've heard good things about Glassbox, and there is an presentation about using Glassbox with Glassfish pluss other options.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.