Closed skyjilygao closed 6 years ago
因为mysql5有 wait_timeout设置,8小时。过了8小时就需要重更新链接。
在applicationcontext-xxl-job-admin.xml中id="dataSource"加入一下内容就可以了。
<property name="idleConnectionTestPeriod" value="60" />
<property name="testConnectionOnCheckin" value="false"/>
<property name="testConnectionOnCheckout" value="true"/>
Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
1.8.2
Expected behavior
正常调度任务
Actual behavior
报错, Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Steps to reproduce the behavior
Other information