users@glassfish.java.net

Re: Server stops responding due to Glassfish

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Wed, 30 Apr 2008 19:08:42 -0400

glassfish_at_javadesktop.org wrote:
> I corrected the JVM option as you noted.
>
> Assuming that Grizzly is the problem, is there a downside to using Coyote? Also, I don't see log entries specifically that say Coyote is being used instead of Grizzly. Should I expect such?
>
Run this command at the command prompt, then search the file for the
word grizzly:

asadmin generate-jvm-report --type=thread > threaddump.txt


I can't touch my production server during the day unless it goes down,
so I'm not running coyote yet. I don't know how to tell if it is
running, that's just a guess. Here is what Jeanfrancois said about
Coyote earlier in this thread:

> You gonna face the same problem I suspect, or some requests will be
> dropped by Coyote if all the thread gets dead locked like It looks
> like. The difference between Grizzly & Coyote is Coyote drops requests
> (404), Grizzly queue them until it reach the max (4096 connection in
> the queue), and then close connection as well. The problem is if all
> Grizzly threads deadlock, then issuing a request will exactly produce
> what you are seeing, which is a browser spin. Now based on you
> exception, the queue is executed and Grizzly try to write response on
> closed connection. That means a thread has been released and grizzly
> is using it. So your Servlet seems to starts executing really slowly.
> We need to find why :-)
At the moment he is thinking that GlassFish is working properly, by my
program is deadlocking servlet threads somehow causing the symptoms to
manifest. He's looking at some of my thread dumps, which do indicate a
lot of my own threads are locked... but they are supposed to lock in
some cases. I wrote a JCA connector that manages it's own threads. It
is exposed as a web service on one http listener, and my EJB is calling
into it. It's possible that this whole time the issues have been my
fault, but I need help finding out what I did wrong. Hopefully Sun can
help, or find that it really is GlassFish. All I know is that from the
user's point of view, my app is working fine and is responsive until it
just dies.


Thanks,
Ryan