i am working on opensource java based application i.e xwiki. Inside hibernate.cfg.xml i can see value of parameters connection.pool_size and statement_cache.size as 2 (for each). My application will be having maximum load of 100 users at point of time. Now my question is what should be ideal connection pool size for this. To me size 2 looks very less. If 100 users connect at a time 98 users have to wait for getting the connection released? Should i keep the connection pool size as 100 in my case?
i am using microsoft sql server.
Apart from this is there a limit on max connection pool size. Does it depend on webserver(tomcat in my case) or datastore vendor(ms sql server)?
If a typical request spends 50% of its time doing calculations and 50% on database connectivity you might only need 50 connections in your pool. Of course your application should release the db connection as early as possible.
In general holding a connection is not expensive for a database (while creating a new one is quite expensive). It should be no problem to keep the size high enough.
You can set
I am not familiar with microsoft sql server but I think its max pool limit is 100
Tomcat will be fine with this number of pool size.