错误日志:
2019-01-28 09:42:10.623 ERROR 16056 --- [ job-event-9] c.d.d.job.event.rdb.JobEventRdbStorage : wait millis 18, active 8, maxActive 100, creating 1, runningSqlCount 2 : INSERT INTO `JOB_STATUS_TRACE_LOG` (`id`, `job_name`, `original_task_id`, `task_id`, `slave_id`, `source`, `execution_type`, `sharding_item`, `state`, `message`, `creation_time`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
runningSqlCount 2 : INSERT INTO `JOB_EXECUTION_LOG` (`id`, `job_name`, `task_id`, `hostname`, `ip`, `sharding_item`, `execution_source`, `is_success`, `start_time`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);
runningSqlCount 1 : SELECT original_task_id FROM JOB_STATUS_TRACE_LOG WHERE task_id = 'OrderExpireJob-0019@-@0@-@READY@[email protected]@-@16056' and state='TASK_STAGING'
runningSqlCount 1 : SELECT original_task_id FROM JOB_STATUS_TRACE_LOG WHERE task_id = 'OrderExpireJob-0020@-@0@-@READY@[email protected]@-@16056' and state='TASK_STAGING'
解决方法:
将maxWait: 由10改为200
username: root password: root driver-class-name: com.mysql.cj.jdbc.Driver filters: stat # maxActive: 500 maxActive: 100 initialSize: 5 maxWait: 200 #maxWait: 10 minIdle: 5 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: listByCategoryId 'x' testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true maxOpenPreparedStatements: 20