tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: TC3.3 blocking (was: In jk_endpoint_t::service, get_reply failed in send loop 1)
Date Wed, 03 Apr 2002 02:35:24 GMT

----- Original Message -----
From: "PSA" <>
To: "Tomcat Users List" <>
Sent: Tuesday, April 02, 2002 9:34 AM
Subject: TC3.3 blocking (was: In jk_endpoint_t::service, get_reply failed in
send loop 1)

> Bill - Thanks for your efforts.
> We finally tracked the problem to a servlet which was trying to make a
> JDBC connection to a server that it couldn't reach.  This was easy to
> fix, but what I don't understand is
> 1) Why did all of the other requests to the server have to wait for this
> one?  Is something synchronized here?  With no traffic to the server the
> misbehaving servlet would eventually return when it caught the SQL
> exception for the timed out connection.  All pending requests would go
> through at that time as well.

Tomcat isn't synchronizing in the service method (except for STM servlets of
course, when it is on the servlet), and only synchronizing on the servlet in
the init method.  In the case of a jsp:useBean, it will synchronize on the
"scope" during the init calls however.  Of course, the servlet is free to
synchronize on anything that it can get it's hands on.

> 2) Why did the other contexts also get held up for this one servlet?  We
> have been considering allowing some users to use JSPs in their own
> (restricted) contexts.  But this will never be possible when one servlet
> can take everything down.

No clue.  It shouldn't happen (and doesn't for me).

> 3) Why all of the failed connection entries in the jk.log?  It appears
> that all of tomcat was blocking for this one servlet (and not even a
> singleton) while mod_jk tried in vain to contact it.

It looks like you exceeded the "maxThreads" paramater on the
Ajp13Interceptor during the time your servlet was stuck.
> 4) Is there any way to fix this?  We are using an only slightly modified
> version of the tomcat 3.3(.1) default configuration (though Apache is
> heavily configured and mod_rewrite directives abound).  I'd really
> prefer to not have to make configuration changes to the httpd.conf
> includes, but would a different connector have the same problem?  JK2?
You probably want to increase the maxThreads on Ajp13Interceptor (it should
be > MaxChild in Apache).  Then people coming in might get stuck until the
servlet times out.  AFAIK all of the connectors would have the same problem.
> Thanks.
> Paul Anguiano
> Unix SysAdmin/Webmaster
> Seattle Public Schools

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message