After code change in 60319, connector attributes will be reported as -1 when an Executor is in use. But in Http11Processor.disableKeepAlive(), we still use endpoint.getMaxThreads() to get max threads allowed, and when use a Executor, this returns -1, and disableKeepAlive() always return false in this case. This issue exist from 7.0.73 to 7.0.79. Thanks.
I found this issue in some of my customer environment, our application use 200 threads, and some customer have more than 300 clients, so about 100+ client can't connect to server. After some check, I found all thread blocked on keep-alive state and trying to read next request from socket.
Another issue I found: With below server configuration: <Executor name="tomcatThreadPool" namePrefix="http-exec-" maxThreads="4" minSpareThreads="2"/> <Connector executor="tomcatThreadPool" maxThreads="2" /> From document of Connector.executor, if I use Executor in Connector(so not use internalExecutor), maxThreads and other thread pool related properties will ignored(so return -1), but I found Connector's service thread count still limited by Connector.maxThreads. e.g. in above example, the executor has 4 threads, but in my test, only 2 clients connected and both keep alived and no more client can connect. Please also help to check this issue. I use 7.0.75 in my tests.
Thanks for the report. Both issues are fixed in: - 8.0.x for 8.0.46 onwards - 7.0.x for 7.0.80 onwards Note since this affects the BIO connector, it does not apply to 8.5.x onwards.