We are using Apache DBCP 1.4 for database connection pooling, with Java back-end, in our application. We set the value for maxActive = 20(by default), there was a scenario where requests needed more than 20 connection for execution. At that time application gets hang/unresponsive.
I have increased the value to maxActive = 50. Then execution completes successfully. In documentation of Apache DBCP, I have seen we can put the value of maxActive = -1, and this will not set upper limit on connection creation. Can I set maxActive = -1, if not can you please help me understand why it is not desirable and also what can be descent value we can set for maxActive so that my application do not gets hang/unresponsive.
Motivations to limit the number of connections in a db-Pool
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.