You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bill Tomlinson <bt...@rndsti.com> on 2003/05/28 16:07:13 UTC

HttpProcessor not freeing back to pool

We've started having a problem with HttpProcessors not being freed up. We're
runing tomcat in standalone mode and it starts up fine and creates about 28
HttpProcessor threads and runs for several days without any problems, then
we see this in the catalina_log:

2003-05-27 16:09:38 HttpProcessor[443][29] Starting background thread
2003-05-27 16:09:42 HttpProcessor[443][30] Starting background thread
2003-05-27 16:09:48 HttpProcessor[443][31] Starting background thread
[skipping the same log message for threads 32 to 146]
2003-05-27 16:34:45 HttpProcessor[443][147] Starting background thread
2003-05-27 16:35:02 HttpProcessor[443][148] Starting background thread
2003-05-27 16:35:11 HttpProcessor[443][149] Starting background thread
2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
this connection
2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
this connection
2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
this connection
[and so on...]

And then the connections keep getting rejected until we restart tomcat.
There is nothing interesting in the access or error logs around the time
shown in the catalina log. I don't know if it's relevant, but you'll note
that this is on an SSL connector.

I don't think that its a performance or tuning or load issue because it
never resolves on it's own (and we've left it running for several hours). It
looks like something happens that causes HttpProcessors to stop being
released back into the pool.

I've searched the web, usenet, this mailing list, and the tomcat bugs DB so
I know that questions similar to this one come up from time to time and I've
read all the related information but it hasn't helped. So any additional
information would be helpful.

Also, I'll take the novel approach and assume that the error might lie in my
code and ask if there are any things that servlets can do that would cause
the HttpProcessor to not be released? (I naively assumed that there were
various timeouts that would release the HttpProcessors even in the case of
monumental stupidity on the part of the servlet programmer.)

For more information, I'm running Windows 2000 Server, tomcat 4.1.21, and
java 1.3.1_07. And here's the connector part of my server.xml:

    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="443" minProcessors="5" maxProcessors="150"
               enableLookups="true"
	       acceptCount="10" debug="0" scheme="https" secure="true">
      <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
               clientAuth="false" protocol="TLS"
               keystoreFile="C:/webressecure/tomcat_keystore"
keystorePass="password"/>
    </Connector>

Thanks,
Bill Tomlinson

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: HttpProcessor not freeing back to pool

Posted by Sourabh Kulkarni <so...@geometricsoftware.com>.
Hi Bill,
    I had faced a similar problem sometime back. What I had found was that
the problem was in our code. We weren't closing the IOStreams properly. This
prevented the HttpProcessor from getting released back to pool. After doing
that the problem was almost gone. Also, I shifted to CoyoteConnector instead
of HttpConnector. One point though, I was not using SSL (I don't think this
would make difference).
HTH,
-Sourabh Kulkarni
sourabhk@geometricsoftware.com

"Discretion is being able to raise your eyebrow instead of your voice"

************************************************************************
This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named above.
If you are not the intended recipient, please do not review, disclose,
disseminate, distribute or copy this e-mail and attachments. If you have
received this communication in error, please notify the sender immediately
by email or telephone at +91-20-2906219
************************************************************************

----- Original Message -----
From: "Bill Tomlinson" <bt...@rndsti.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, May 28, 2003 7:37 PM
Subject: HttpProcessor not freeing back to pool


>
> We've started having a problem with HttpProcessors not being freed up.
We're
> runing tomcat in standalone mode and it starts up fine and creates about
28
> HttpProcessor threads and runs for several days without any problems, then
> we see this in the catalina_log:
>
> 2003-05-27 16:09:38 HttpProcessor[443][29] Starting background thread
> 2003-05-27 16:09:42 HttpProcessor[443][30] Starting background thread
> 2003-05-27 16:09:48 HttpProcessor[443][31] Starting background thread
> [skipping the same log message for threads 32 to 146]
> 2003-05-27 16:34:45 HttpProcessor[443][147] Starting background thread
> 2003-05-27 16:35:02 HttpProcessor[443][148] Starting background thread
> 2003-05-27 16:35:11 HttpProcessor[443][149] Starting background thread
> 2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
> this connection
> 2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
> this connection
> 2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
> this connection
> [and so on...]
>
> And then the connections keep getting rejected until we restart tomcat.
> There is nothing interesting in the access or error logs around the time
> shown in the catalina log. I don't know if it's relevant, but you'll note
> that this is on an SSL connector.
>
> I don't think that its a performance or tuning or load issue because it
> never resolves on it's own (and we've left it running for several hours).
It
> looks like something happens that causes HttpProcessors to stop being
> released back into the pool.
>
> I've searched the web, usenet, this mailing list, and the tomcat bugs DB
so
> I know that questions similar to this one come up from time to time and
I've
> read all the related information but it hasn't helped. So any additional
> information would be helpful.
>
> Also, I'll take the novel approach and assume that the error might lie in
my
> code and ask if there are any things that servlets can do that would cause
> the HttpProcessor to not be released? (I naively assumed that there were
> various timeouts that would release the HttpProcessors even in the case of
> monumental stupidity on the part of the servlet programmer.)
>
> For more information, I'm running Windows 2000 Server, tomcat 4.1.21, and
> java 1.3.1_07. And here's the connector part of my server.xml:
>
>     <Connector
className="org.apache.catalina.connector.http.HttpConnector"
>                port="443" minProcessors="5" maxProcessors="150"
>                enableLookups="true"
>        acceptCount="10" debug="0" scheme="https" secure="true">
>       <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
>                clientAuth="false" protocol="TLS"
>                keystoreFile="C:/webressecure/tomcat_keystore"
> keystorePass="password"/>
>     </Connector>
>
> Thanks,
> Bill Tomlinson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: HttpProcessor not freeing back to pool

Posted by Justin Ruthenbeck <ju...@nextengine.com>.
Each of the HttpProcessor's are separate Threads running in the JVM, so 
something is hanging (most likely in your code) and never returning the 
Processor to the pool.  Try getting a Thread dump (Ctrl-Brk) and see where 
these threads are hanging at ... it'll probably be obvious from that.

justin


At 07:07 AM 5/28/2003, you wrote:

>We've started having a problem with HttpProcessors not being freed up. We're
>runing tomcat in standalone mode and it starts up fine and creates about 28
>HttpProcessor threads and runs for several days without any problems, then
>we see this in the catalina_log:
>
>2003-05-27 16:09:38 HttpProcessor[443][29] Starting background thread
>2003-05-27 16:09:42 HttpProcessor[443][30] Starting background thread
>2003-05-27 16:09:48 HttpProcessor[443][31] Starting background thread
>[skipping the same log message for threads 32 to 146]
>2003-05-27 16:34:45 HttpProcessor[443][147] Starting background thread
>2003-05-27 16:35:02 HttpProcessor[443][148] Starting background thread
>2003-05-27 16:35:11 HttpProcessor[443][149] Starting background thread
>2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
>this connection
>2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
>this connection
>2003-05-27 16:35:11 HttpConnector[443] No processor available, rejecting
>this connection
>[and so on...]
>
>And then the connections keep getting rejected until we restart tomcat.
>There is nothing interesting in the access or error logs around the time
>shown in the catalina log. I don't know if it's relevant, but you'll note
>that this is on an SSL connector.
>
>I don't think that its a performance or tuning or load issue because it
>never resolves on it's own (and we've left it running for several hours). It
>looks like something happens that causes HttpProcessors to stop being
>released back into the pool.
>
>I've searched the web, usenet, this mailing list, and the tomcat bugs DB so
>I know that questions similar to this one come up from time to time and I've
>read all the related information but it hasn't helped. So any additional
>information would be helpful.
>
>Also, I'll take the novel approach and assume that the error might lie in my
>code and ask if there are any things that servlets can do that would cause
>the HttpProcessor to not be released? (I naively assumed that there were
>various timeouts that would release the HttpProcessors even in the case of
>monumental stupidity on the part of the servlet programmer.)
>
>For more information, I'm running Windows 2000 Server, tomcat 4.1.21, and
>java 1.3.1_07. And here's the connector part of my server.xml:
>
>     <Connector className="org.apache.catalina.connector.http.HttpConnector"
>                port="443" minProcessors="5" maxProcessors="150"
>                enableLookups="true"
>                acceptCount="10" debug="0" scheme="https" secure="true">
>       <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
>                clientAuth="false" protocol="TLS"
>                keystoreFile="C:/webressecure/tomcat_keystore"
>keystorePass="password"/>
>     </Connector>
>
>Thanks,
>Bill Tomlinson
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
    See http://www.nextengine.com/confidentiality.php
____________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org