My personal theory is that you are making 1.1 requests, and the background
thread isn't getting around to closing the connections.

You could specify:

Connection: close

as a header so that tomcat will immediately close the connections. The lower
case version does seem to be honored.

-----Original Message-----
From: Marinko, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 14 August, 2002 4:29 PM
To: 'Tomcat Users List'
Subject: RE: Resend: Tomcat Connection Management/Performance


I've verified the behavior.  The connection is closed roughly 5 seconds
after I request it (my timeout is set to 5 seconds, so that makes sense).
Although that makes sense, since we specified a 1.1 request...

I tried it using "HTTP/1.0" and the connection closed immediately.  I don't
see any problems with this behavior.

-----Original Message-----
From: Sexton, George [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 3:05 PM
To: Tomcat Users List
Subject: RE: Resend: Tomcat Connection Management/Performance


This would be worth verifying. I just used telnet to play with the HTTP
connector.

HTTP 1.0 requests are closed immediately after the data is sent.

HTTP 1.1 requests are not closed until 60 seconds have elapsed. The HTTP
connector also seems to ignore the Connection: Close directive.

You can verify this behavior by using telnet to connect to the specified
port and doing some manual requests:

GET /your_servlet_URL HTTP/1.1
Host: yourhostname.com

and press enter twice.


-----Original Message-----
From: Marinko, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 14 August, 2002 3:57 PM
To: 'Tomcat Users List'
Subject: RE: Resend: Tomcat Connection Management/Performance


I'm fairly certain they are 1.0 requests.

-----Original Message-----
From: Sexton, George [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 14, 2002 2:49 PM
To: Tomcat Users List
Subject: RE: Resend: Tomcat Connection Management/Performance


Just out of curiosity, does your test bed do HTTP 1.0 requests, or HTTP 1.1
requests?

Does it explicitly set a

Connection: close

header in the request if you are doing http 1.1 requests?



-----Original Message-----
From: Marinko, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 14 August, 2002 3:41 PM
To: 'Tomcat Users List (E-mail)'
Subject: Resend: Tomcat Connection Management/Performance


Greetings!

I've been running some performance tests and have run into a slight problem.
Connections are not being properly closed/timed out, and this causes a great
deal of processing by Tomcat and incoming connections to be refused (as the
connections reach "acceptCount" in server.xml).

I am using a simple tool to do transactions per second (TPS), and for the
most part Tomcat and my underlying servlet are performing very well
(underlying servlet does not create any connections).  However, after
running for a while (several thousand requests), I get numerous "connection
refused" errors.  When I do a "netstat -a" on WinNT 4 or Win2K, I can see
numerous connections between the test program/box and Tomcat sitting in a
TIME_WAIT status.  These connections persist even after I stop the test, and
even after the "connectionTimeout" value I specified in server.xml.

The numerous connections eventually go away, but not nearly quickly enough.
Any advice on how to remedy this problem?

Some details:  Tomcat 4.0.4, WinNT/2K, JDK 1.3.1 and 1.4 (happens on both).
In server.xml:
       <Connector
className="org.apache.catalina.connector.http.HttpConnector"
               port="8080" minProcessors="100" maxProcessors="100"
               enableLookups="false" redirectPort="8443" bufferSize="8192"
               acceptCount="2000" debug="0" connectionTimeout="5000"/>

If I'm interpreting the docs right, the "connectionTimeout" should be 5
seconds.  Typically, the connections that are the problem don't go away for
30+ seconds, far longer than I can afford.

Any suggestions would be great!

Jeff


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to