Tomcat Connection Pool Exhausted

前端 未结 1 799
抹茶落季
抹茶落季 2021-01-04 21:23

I\'m using Apache Tomcat JDBC connection pooling in my project. I\'m confused because under heavy load I keep seeing the following error:

12:26:36,410 ERROR          


        
相关标签:
1条回答
  • 2021-01-04 21:59

    This working as per design/implementation, if you see the log Timeout: Pool empty. Unable to fetch a connection in 10 seconds and your configuration is p.setMaxWait(10000);. The requesting thread waits for 10seconds(10000 millseconds, maxwait) before giving up waiting for connection.

    Now you have two solutions, increase the number of maxActive connection or check if there are any connection leaks/long running queries(which you do not expect).

    0 讨论(0)
提交回复
热议问题