Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Problem

Users may observe the following MySQL error:

Code Block
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 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 is relatively short and the JOC Cockpit does not keep the connection busy over longer periods without user interaction - for example, overnight. 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.

    1. 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.)
    2. 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):

        Code Block
        set @wait_timeout = 86400;
    3. Check the updated value of the wait_timeout variable by running the following command:

      Code Block
      select @wait_timeout;
    4. Restart your JOC Cockpit to establish a new database connection to MySQL.
    See the JOC Cockpit - Troubleshooting - Database Connection to MySQL unavailable after idle timeout article for instructions about how to change the MySQL DBMS wait_timeout setting.