十二月 05, 2016 9:03:59 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springServlet] in context with path [/store] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.tomcat.jdbc.pool.PoolExhaustedException: [http-nio-0.0.0.0-8080-exec-9] Timeout: Pool empty. Unable to fetch a connection in 10 seconds, none available[size:2; busy:2; idle:0; lastwait:10000].] with root cause
org.apache.tomcat.jdbc.pool.PoolExhaustedException: [http-nio-0.0.0.0-8080-exec-9] Timeout: Pool empty. Unable to fetch a connection in 10 seconds, none available[size:2; busy:2; idle:0; lastwait:10000].
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:689)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:187)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:132)
你创建的连接池里初始化的两个连接都在使用中,导致现请求无法获取连接,检查下是否每次使用连接后是否关闭connection,只有关闭了才会回到连接池以待下一次连接使用
java 连接池配了2个然后不够用了?