Search code examples
mysqlrundeck

Rundeck Cluster with Mysql Backend Run Job Error - An Error Occurred Lock wait timeout exceeded; try restarting transaction


I have setup a Rundeck cluster with Mysql backend.

VM1: Rundeck1 + Mysql data node 1
VM2: Rundeck2 + Mysql data node 2
VM3: Management Node

NFS: Projects folder shared + /var/logs shared

my.cnf settings:

[client]
port = 3306
socket = /tmp/mysql.sock

[mysqld]
port = 3306
socket = /tmp/mysql.sock

default-storage-engine=NDBCLUSTER

ndbcluster

innodb_lock_wait_timeout = 120
lock-wait-timeout= 120

[mysql_cluster]
ndb-connectstring= xx.x.xxx.xx # location of management server

Whenever I create a project and run the jobs it keeps giving the following error:

An Error Occurred
Lock wait timeout exceeded; try restarting transaction

But the jobs runs fine and gets completed. This I can see from the activity section of the project in rundeck.

I have already set the following too:

 @@GLOBAL.tx_isolation, @@tx_isolation, @@session.tx_isolation;

Kindly Help please.


Solution

  • Try to increase the value of innodb_lock_wait_timeout to a value according to your requirements.. try value to 3000 example.

    SET GLOBAL innodb_lock_wait_timeout = 3000;

    120 looks so low..

    also try show processlist command and kill some of the long running queries using kill command