quartz报错 java.sql.SQLException: Timed out waiting for a free available connection.

整合项目 将quartz和mysql合并为一个DataSource

2020-01-07 11:44:10.162 [schedulerFactoryBean_QuartzSchedulerThread] ERROR [org.quartz.core.ErrorLogger-2460] An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.schedulerFactoryBean': java.sql.SQLException: Timed out waiting for a free available connection.
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:168)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3774)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2759)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
Caused by: java.sql.SQLException: Timed out waiting for a free available connection.
    at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:503)
    at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:114)
    at org.springframework.scheduling.quartz.LocalDataSourceJobStore$2.getConnection(LocalDataSourceJobStore.java:135)
    at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:108)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:165)
    ... 3 common frames omitted

数据库在配置中多设置一些连接试试看,Timed out waiting for a free available connection应该是连接池满了