users@glassfish.java.net

Re: Glassfish hangs after a few days

From: <glassfish_at_javadesktop.org>
Date: Mon, 11 Feb 2008 12:09:45 PST

There are lots of idle grizzly threads in there, so it doesn't appear to be a container issue. In fact, when you say you can make new connections but not get a response, do you mean not get a response from your app? If you can visit http://hostname:port/index.html and see the standard appserver index.html (which given this stack trace is what ought to happen), that's more confirmation that it's an application error (though the application error I'm about to describe could cause all grizzly threads to hang as well, so if that doesn't work, it's not necessarily that there is a container issue either).

See in the stack in the trace where there is a thread doing some postgres work? That might be blocking some database resource that everything else in your app needs. I'd take jstacks over a few minutes and see if you ever break out of that; it's possible that query is just taking a really long time to process and has blocked the rest of your app. Or perhaps if you examine further stacks over time, you can deduce what's hanging up your app.
[Message sent by forum member 'sdo' (sdo)]

http://forums.java.net/jive/thread.jspa?messageID=258400