Originally posted by Slava Imeshev:
For production mode it makes sense to set initalSize = maxSize. Also, size of the pool should be equal at least maximum number of simultaneous requests (there is a config parameter in tomcat's server.xml connector stanza, maxProcessors.
HTH
Not sure I agree on setting
initalSize = maxSize. Due to the nature of ConnectionPools, if another connection is likely to be needed, they can open it just in case rather than holding the Connection open. Setting the values different would allow the pool to grow and shrink as dictated by demand, and may have an effect on the load on the application server and database server.
Note that this is all based on gut-feel and I have absolutely no empirical data to back it up.
It is also worth noting that matching web connections to database connections may not be the best initial match. If database operations are typically short, you may be able to set database connections to a tenth of what the web server accepts. Also keep in mind that a single web connection may possibly require several database connections at once.
Just random thoughts, really.
Dave.