On 20/05/2021 07:24, Paul P Wolf wrote:
OK, that looks like clients with a connection timeout of 5s.
Correct. I think I forgot to mention, that I set the connection timeout of the 
curl instances to 5s. I didn't set the max timeout

Connection refusal is entirely under the control of the OS and will
be driven largely by the actual value of acceptCount/backlog.
So if it is not up to Tomcat, then the documentation "Any further
simultaneous requests will receive "connection refused" errors" is clearly
wrong, isn't it?

That statement in the docs ignores acceptCount so it certainly needs
updating to reflect that.
I am not sure what you mean by "ignores acceptCount" as it directly relates to 
it.
Source: https://tomcat.apache.org/tomcat-9.0-doc/config/http.html
Longer quote:
"Each incoming request requires a thread for the duration of that request. If more 
simultaneous requests are received than can be handled by the currently available request 
processing threads, additional threads will be created up to the configured maximum (the value of 
the maxThreads attribute). If still more simultaneous requests are received, they are stacked up 
inside the server socket created by the Connector, up to the configured maximum (the value of the 
acceptCount attribute). Any further simultaneous requests will receive "connection 
refused" errors, until resources are available to process them."

It uses acceptCount where it should use maxConnections and doesn't describe acceptCount at all.

I think if we replaced "connection refused" with "connection refused or
connection timeout" that should cover the possible variations.
While this may seem like a minor change, I would really appreciate it. This 
minor detail would have saved us a lot of time, effort and money. This gets 
compounded by sites like Stackoverflow perpetuating bad assumptions about how 
Tomcat behaves in such situations.

Again: Thank you very much for all the information and help you provided. I 
would appreciate it, if you could update the documentation to reflect that 
tomcat does not always refuse connections in these situation (from what I 
understood, tomcat doesn't handle these situations at all, but the OS does 
instead).

I'll get docs updated. The website will update after the next round of releases (due in the first week or so of June).

Mark

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

Reply via email to