简体   繁体   中英

SQL server connection pooling in java exceeds 600, cause database to crash?

I have a application which requires Connection pooling, as the server has several clients communicating to it at same time, which may be around 10k. And when i limit maxActive =200, updation of the database slows.

Application programming i have did in Java. Connection pooling i am doing with the help of Tomcat Context.xml. Database i am using SQL server 2005.

Please help me in doing the correct way of pooling, such that my application does not slows down.

There is no concept of correct way of pooling, you have to find out by inspecting with how many active connections you are able to get maximum throughput.

1) Check any inactive connections which are not closed.
2) Do some analysis to find out the root causes or when it's eating up lot of connections.

Ideally for any project the most common parameters I have seen is 200 - 300 active connections, if it exceeds more than that it's more likely an enterprise application for which you have to rely on infrastructure rather than programmatically.

After a certain threshold you should look at clustering of databases as you can tweak it to a certain extent once you have identified there are no places in program to optimize.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM