1

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!

2 Answers 2

2

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.
2
  • 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. Jun 6, 2009 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, 2009 at 16:08
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .