请问我用多线程(20个)去数据库存储操作,每个线程循环50次(逻辑如此),跑了一段时间后只剩下一个线程,其他都挂了, 请问是什么原因呢,
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Connections could not be acquired from the underlying database! at com.jfinal.plugin.activerecord.Model.save(Model.java:413) at com.tools.upyun.UpYunTools$1.run(UpYunTools.java:123) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database! at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at com.jfinal.plugin.activerecord.Config.getConnection(Config.java:161) at com.jfinal.plugin.activerecord.Model.save(Model.java:401) ... 2 more Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) ... 5 more 数据库最大连接100
项目:JFinal