Lock wait timeout exceeded; try restarting transaction

Nirjonadda

Well-Known Member
May 8, 2013
762
28
78
cPanel Access Level
Root Administrator
Please let me know that how to fixing error "Lock wait timeout exceeded; try restarting transaction" ?


Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

Do you receive this error message with a particular script installed on a website? Also, could you let us know the contents of the /etc/my.cnf file on the system?

Thank you.
 

Nirjonadda

Well-Known Member
May 8, 2013
762
28
78
cPanel Access Level
Root Administrator
Hello,

Do you receive this error message with a particular script installed on a website? Also, could you let us know the contents of the /etc/my.cnf file on the system?

Thank you.
This error generated server error log and found in admin CP.

Code:
[mysqld]
performance-schema=0
local-infile=0
innodb_lock_wait_timeout=1000
innodb_autoinc_lock_mode = 1
wait_timeout = 28800
interactive_timeout = 28800
connect_timeout=5000
lock_wait_timeout=31536000
#innodb_force_recovery = 2

max_connections=5000
max_user_connections = 1000
datadir=/var/lib/mysql
socket          = /var/lib/mysql/mysql.sock

key_buffer_size = 1024M

table_open_cache=28560
open_files_limit=50000
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 6M
tmp_table_size=128M
read_rnd_buffer_size=4M
max_heap_table_size=256M
myisam_sort_buffer_size=64M
thread_cache_size=8
query_cache_limit=256M
query_cache_size=256M
thread_concurrency = 8
wait_timeout=2000
connect_timeout=2000
interactive_timeout=2000
#log-slow-queries = /var/log/mysqlslowqueries.log
max_allowed_packet=268435456

default-storage-engine=MyISAM
innodb_file_per_table=1
innodb_buffer_pool_size = 3000M
innodb_flush_method=O_DIRECT

[isamchk]
key_buffer =64M
sort_buffer_size = 64M
read_buffer = 16M
write_buffer = 16M

[myisamchk]
key_buffer = 64M
sort_buffer_size = 64M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout
[mysqld_safe]

log-error=/var/log/mysqld.log
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

You can try increasing the "innodb_lock_wait_timeout" value in your /etc/my.cnf file and then restarting MySQL to see if the issue persists.

Thank you.