anilgursel commented on pull request #371: URL: https://github.com/apache/tomcat/pull/371#issuecomment-718799285
I updated the PR to have it as `getMaxConnections() / 2`. I agree it is just a heuristic and not clean. We can potentially make it configurable? If my understanding is correct, one reason to schedule the `accept` is to prevent blocking the thread. The reason behind blocking (via `LimitLatch`) is to have a hard limit on the `maxConnections`. Is there any possibility to relax this a bit? Something like: ```java else if (getConnectionCount() < getMaxConnections()) { increment(); serverSock.accept(null, this); } ``` With this, there is possibility of number of connections to go over `maxConnections` little bit (which I think the expectation can be managed in documentation). Actually, I believe there will only be one thread doing `accept` logic at any given time. Because, a new `accept` is scheduled only when the previous one is `completed`. Is this true? If so, it would not go beyond maxConnections. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org