Hi! I am running Tomcat 8 as part of Spring Boot application. As usual,
acceptCount defaults to 100 and maxThreads to 200. According to
https://tomcat.apache.org/tomcat-8.5-doc/config/http.html#NIO_specific_configuration
I am expecting Tomcat to accept 200 "long" requests (each taking say 20
seconds to complete), then accept 100 more connections but not start
reading from them, and then reject any connection requests beyond that.
That's why this is the expected behavior: acceptCount = "The maximum queue
length for incoming connection requests when all possible request
processing threads are in use. Any requests received when the queue is full
will be refused." So, when first 200 requests are all taken by 200
processing threads, next 100 will go to the queue and subsequent will be
ignored. At least that's how it reads to me.

But what I actually see on my Mac is, tomcat successfully accepts a little
short of 1000 such connections (I just didn't try more connections) made
within 5 seconds. It processes no more than 200 requests at a time, but
does not reject connections after 300th one, as one would expect.

What's the explanation for that? Can the quoted documentation be imprecise
or outdated? Or am I missing something in it?

I tried to ask the same question on stackoverflow, to little success:
https://stackoverflow.com/questions/50079513/tomcat-and-acceptcount-not-working

Thanks,
Maksim

Reply via email to