My web app give me this error after execute few query to my sql db.
The full exception is:
org.apache.tomcat.jdbc.pool.PoolExhaustedException Timeout: Pool empty. Unable to fetch a connection in 1 seconds, none available[size:10; busy:10; idle:0; lastwait:1000].
My context.xml is:
My Connection.java to set connection is:
I close everything in my methods, ResultSet, Statement and Connection, like this for example:
However I don’t understand where this error came from. The error talks about size=10 and lastwait=1000, but in my conf file I have set initialSize=15 and maxWait=100000 to test, but it didn’t work. Help me pls.