Thank you Thomas. I carefully read your explanation. It makes sense to me and is completely different from what I understood up until this point. With this new understanding, the problem still persists. Please let me rephrase my issues in the light of what I just learned.
To summarize: - thread limit defines how many requests can be processed concurrently. - maxConnections defines how many connections are accepted by tomcat via socket.accept() and can be monitored by tomcat. this does not include the connections/requests being currently processed in an active thread. - acceptCount is an OS backlag, which is not monitored by tomcat and the OS may decides to override the value. - if all threads, maxConnections and acceptCount backlog are full, further requests get refused by the OS Now my still persisting issues: > Say Tomcat can process 2000 requests a second and the typical client timeout > is 5s, then an acceptCount/backlog of anything up to 10000 should be OK but > above that some clients will time out because Tomcat won't be able to clear > the all backlog before the unprocessed client connections timeout. If there are more requests than there is space in the backlog and the maxConnections is reached, why would you expect client timeouts instead of refused connections? Timeouts are what I see, but not what I expect, when I read "Any further simultaneous requests will receive "connection refused" errors". Different question around the same issue: What would need to happen, so that there would be refused connections instead of client timeouts? > Your numbers are too close together. If you use numbers that are further > apart, the behaviour should be more obvious. Something like: > maxThreads=4 > maxConnections=10 > acceptCount=20 What do you mean by "numbers are too close together"? Why would that be an issue? What would be far enough? Is there any documentation? The processing speed shouldn't be an issue, as the endpoints sleep for 10s. Regardless, I tried your suggested configuration and nothing really changed: I see 31 successful requests and 19 timed out after 5 seconds. Still not a single refused connection. And considering the numbers, the OS acknowledged the configured acceptCount number. Same question as before: what needs to change to make Tomcat refuse connections? This still seems like a bug to me. ________________________________ Pflichtangaben anzeigen<http://www.deutschebahn.com/pflichtangaben/20210430> Nähere Informationen zur Datenverarbeitung im DB-Konzern finden Sie hier: http://www.deutschebahn.com/de/konzern/datenschutz