Problem
Users may observe the following MySQL error:
Error connecting to [host]:[port]: SOS-JAVA-105 Java-Exception java.sql.SQLException("No operations allowed after connection closed."), methode=rollback []
If the connection to the MySQL database was idle for some time without any activity, then MySQL might close the connection without signaling this fact to the JOC Cockpit.
Analysis
- If a MySQL DBMS is being used then the MySQL
wait_timeout
setting that rules the max. lifetime of idle connections should be checked and adjusted if required. - The default
wait_timeout
for MySQL might be too short. The JOC Cockpit assumes a connection to be idle for up to 30 minutes before refreshing the connection.
Solution
If a MySQL DBMS is being used by the JobScheduler, then the MySQL wait_timeout
setting that rules the max. lifetime of idle connections should be checked and if necessary extended.
To change this behavior you can modify the value of the
wait_timeout
system variable. This value assigns the maximum duration in seconds of non-interactive idle connections to the database.- Login into the database that is used by JOC Cockpit via the MySQL command line client or any other MySQL GUI such as MySQL Workbench. (Note: the following commands will only be effective for the currently selected database.)
- Set the
wait_timeout
variable's value by running following command.- Refer to the following article to get the default and maximum values for idle
wait_timeout
for your platform: Server System Variables : wait_timeout. The following command sets the wait timeout to 24 hours (specified in seconds):
set @wait_timeout = 86400;
- Refer to the following article to get the default and maximum values for idle
Check the updated value of the
wait_timeout
variable by running the following command:select @wait_timeout;
- Restart your JOC Cockpit to establish a new database connection to MySQL.