Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lock wait timeout exceeded; try restarting transaction

Discussion in 'Database Discussions' started by Nirjonadda, May 29, 2017.

  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Please let me know that how to fixing error "Lock wait timeout exceeded; try restarting transaction" ?


     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    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.
     
  3. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    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
    
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page