Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I understand that setting the maximum number of connections available in a connection pool should be the same as your maxThreads configured for your Tomcat server (which correlates to the number of requests that can be handled)

For tomcat the default is 200, I assume there is a maximum that you can safely configure for your Tomcat server before things start getting out of control, which I assume is also governed by the resources of the machine it is running on.

I am trying to get an understanding of the size of maxThreads that people are using with success, is 1000 too big?

share|improve this question
up vote 2 down vote accepted

You have to build performance tests for particular application in order to figure out the optimum sizes. Different strategies could be applied in your particular app to work with DBs: some of them release connections to DBs several times per request, others may not give it away during the whole request processing. In first case you can configure thread pool to be larger than connection pool because threads can acquire these connections more often, in second scenario it probably should be nearly the same size because other requests can't be processed and will be blocked on acquiring the connection.

You can take a look at Release It! which is a great book that can describe different strategies. But the overall advise is: always write performance tests, otherwise you can't configure your app properly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.