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
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).