users@glassfish.java.net

Re: Glassfish V2 UR2 HTTP-Listener Stops listening to HTTP Requests

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Fri, 06 Jun 2008 13:08:05 -0400

When I first tried switching to Coyote I had the wrong JVM parameter, so
I was still using Grizzly. By the time I realized, Jeanfrancois from
Sun explained the differences between Grizzly and Coyote. Coyote may
seem to fix the problem, but it doesn't really. Coyote uses blocking IO
and every connection gets a thread. I think it defaults to 100 threads
or so? When some threads are blocked, many others can keep using the
system until all threads are blocked. The next user will get an error
because there are no threads to service him/her. Grizzly uses
asynchronous IO and only 5 threads (by default) for everyone. When all
5 threads are blocked, it waits for one of them to become available to
service request instead of immediately failing. At least that is how
I understood it.


So, I never bothered switching to Coyote. Instead I focused on the real
problem: JDBC driver getting locked when trying to login to DB. Every 5
minutes the ResourceManager flushed the connection pool and tried to
recreate connections. We found out this almost always happens when our
DB server is under excessive loads, like backing up DB over the
network. After exactly 5 user requests to get a DB connection, it would
lock up. Setting the "connector" part of GlassFish to use FINEST log
level exposed exceptions while trying to establish a connection. The
jTDS driver appears to handle connection timeouts better than the
Microsoft JDBC driver v1.0. I need to see it go 3-4 weeks without
lockups before I'm convinced.

Here is the MSDN forum post about the exceptions:

http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3438472&SiteID=1


Ryan


glassfish_at_javadesktop.org wrote:
> Ryan,
>
> It was your thread that I was following before.
>
> I'm pretty sure we're using 1.2. I'm going to try the jTDS now. I just want the site to run the weekend without me having to watch it, as it's effectively in production.
>
> Did you switch back to grizzly after changing the db, or keep with coyote?
>
> Thanks for your quick reply,
>
> Adam
> [Message sent by forum member 'adamburrett' (adamburrett)]
>
> http://forums.java.net/jive/thread.jspa?messageID=278835
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>