tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Can not understand how maxThreads of Connectors works
Date Wed, 16 Jan 2013 20:28:23 GMT
Hash: SHA256


On 1/16/13 3:07 PM, Hermes Flying wrote:
> I believe acceptCount can not work with value 0 because if I am
> not wrong, the acceptCount is the value passed as backlog in the 
> ServerSocket constructor. According to javadoc if the backlog
> value is less than or equal to 0, then a default value is used
> instead which is 50. So acceptCount=0 does not mean that backlog
> queue does not queue anything. That is why I used the value 1
> instead.

Fair enough.

> Also when I say I was expecting a network failure (bad terminology)
> I meant that the client would get a failure in the TCP attempt to 
> connect.


> Also I used maxThreads=0 and the server worked fine. Did not see
> any problem in my applications. Did not check the logs though. I
> assumed that perhaps 0 would be set to some default value. Can not
> answer about your observation. It also makes me wonder.

Sure you can answer about my observation: look at your log files.

> Finally concerning my test setup, I need to configure Tomcat to
> limit the amount of concurrent client requests accepted.

I understand that from reading your initial post.

> I need to configure it so that e.g. 300 concurrent clients can 
> connect but the 301 will not be able to connect (not queued by OS 
> either). That client will see a failure to connect to server in
> TCP level.

I understand your requirements (though I think they are silly).

> Do you need more info on this?

I was asking about your test setup. You said you made 2 simultaneous
requests with what seems to be an effective throughput of 2
simultaneous requests (1 in-process and 1 in the queue) and were
surprised that you got responses. I was not surprised. Are you still

Next, how are you making those two simultaneous requests
(specifically: like, are you using some tool to do it or did you write
your own code)? What happens if you have maxThreads=1 and
acceptCount=1 and you make 10 simultaneous requests? 100?

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with undefined -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message