Beware of acceptCount.

If you use this with the AJP connector and don't enable the native connector, then you won't get what you expect -- and last I checked the documentation gave no warning of this.

In this scenario once you exceed maxThread minus 2 simultaneous connections (there's a clear off by 2 error here somewhere) any additional simultaneous connections go into some sort of weird limbo, are never processed, and eventually time out. This is irrespective of the value of acceptCount used, which is simply ignored in this case! You'd /expect/ a warning to be logged if acceptCount is non-zero and is simply going to be ignored. You'd also expect 503's for requests that are not going to be handled -- not this weird limbo thing.

Overall this is a pretty big gotcha -- especially for those of us supporting enough odd ball platforms that continuously building the native connector for all of these platforms is a non-starter. [One might say just build it once, but we've also had issues with the native connector that are not reproducible with the pure-Java connector.]

This has to be one of the ugliest Tomcat warts I've ever run into.

--
Jess Holle

Caldarale, Charles R wrote:
From: cr...@thetimmermans.net [mailto:cr...@thetimmermans.net]
Subject: RE: Logging servlet time and connections

It could be user sessions if thats whats available.
You can implement an HttpSessionListener to track sessions coming and going 
within a webapp.  See the servlet spec for details
Basically the acceptCount for the connector is much higher than the maxThread count.
The two values are unrelated, so one being higher than the other is irrelevant. 
 Tomcat just passes the acceptCount to the TCP/IP stack, and has no means of 
examining what the TCP/IP stack does with it
So some connections are being held (queued?) without processing.
Are you sure?  Regardless, such information is not available to Tomcat, but it 
/may/ be available from your OS
No, just when the servlet starts processing and when its complete
(we do know the exact servlet we are worried about).
It's probably easiest to add logging to the particular servlet to get that 
specific information.  Once the logging calls are added, you can control 
whether or not they are recorded by manipulating conf/logging.properties.

You may be able to get Tomcat to display such fine-grained detail, but it would 
likely require setting a logging level of DEBUG, which would get way too much 
data written and be a performance problem.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to