Is there something as a common sense accepted ratio between the
- HTTP Connector maxThreads (max HTTP threads handling the users requests),
- HTTP Connector acceptCount (max queue length for incoming connection requests when all possible request processing threads are in use)
- DB pool maxActive (max DB connections in the pool) configuration properties
when it comes to a web base application using tomcat with heavy usage of the database ?
What I mean is that for example we have almost each HTTP request connection is using the database intensively. So, when we have, f.e., much less configured DP pool maxActive (e.g. 100) while the HTTP Connector maxThreads (e.g. 200) is twice bigger. Then there could be a possibility to have one and same DB connection to be shared between the HTTP connections. And that could leads to heavy DB usage / DB stalls connections.
I am aware that web HTTP requests configuration in most of the cases has no relation with the database pool configuration, but are there common cases/practices for a ratio between the properties (maxThreads/acceptCount maxActive) ? E.g. is a common practice the HTTP maxThreads to be larger than the DB maxActive (but thinking 100% larger is too much as per our example - could be let's say 20 or 50% max larger? ) and let's say we have accpetCount with a bigger value, so to queue the HTTP requests by the time the others HTTP requests are processed by the application ?
There is similar question here: Tomcat - Configuring maxThreads and acceptCount in Http connector but with no more precise answer to it