quartz-scheduler / quartz

Code for Quartz Scheduler
http://www.quartz-scheduler.org
Apache License 2.0
6.25k stars 1.92k forks source link

No operations allowed after connection closed. #1146

Open svanschalkwyk opened 1 month ago

svanschalkwyk commented 1 month ago

Receiving error after undetermined time.


java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:111)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:98)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:90)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:64)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:74)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:73)
    at com.mysql.cj.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:2022)
    at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:1059)
    at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.restoreOriginalAtributes(AttributeRestoringConnectionInvocationHandler.java:141)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanupConnection(JobStoreSupport.java:

SELECT quartz.QRTZ_JOB_DETAILS 163 μs

Operations:

SELECT quartz.QRTZ_FIRED_TRIGGERS 251 μs
INSERT quartz.QRTZ_TRIGGERS 301 μs
INSERT quartz.QRTZ_CRON_TRIGGERS 152 μs
SELECT quartz.QRTZ_TRIGGERS 180 μs
EXCEPTION java.sql.SQLException 
EXCEPTION java.sql.SQLException
EXCEPTION java.sql.SQLNonTransientConnectionException
EXCEPTION java.sql.SQLNonTransientConnectionException
EXCEPTION java.sql.SQLNonTransientConnectionException

Config:

org.quartz.scheduler.instanceName=handshake
org.quartz.scheduler.instanceId = AUTO
org.quartz.threadPool.threadCount=10
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource = quartzDS

org.quartz.dataSource.quartzDS.driver = com.mysql.cj.jdbc.Driver
org.quartz.dataSource.quartzDS.URL = jdbc:mysql://${MYSQL_HOST}:3306/quartz

MySQL:

    SET GLOBAL max_connections = 500;
    SET GLOBAL connect_timeout=28800;
    SET GLOBAL interactive_timeout=28800;
    SET GLOBAL wait_timeout=28800;

Quartz Version: 2.3.0 MySQL: 8.4.0

Is there anywhere I can change settings in the Quartz config so this does not occur?