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.

DBD::mysql::st execute failed: Lost connection to MySQL server

Discussion in 'Database Discussions' started by jack2012, Mar 16, 2012.

  1. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi new to forum
    i have a cp vps and i keep getting following emails every 4 hours

    Cron <root@server> /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
    ---

    DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/local/cpanel/scripts/update_db_cache line 61.
    DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at /usr/local/cpanel/scripts/update_db_cache line 63.

    it all started with
    cPanel ChkServd Service Monitor, spamd and then ftp and the latest was hang
    so i done a forced update over several days and it cleared these problems
    but now have the top topic error

    i have read another simular post on here
    http://forums.cpanel.net/f5/cron-ro..._db_cache-scripts-update_db_cache-156453.html
    and i altered the following

    "answer" Try raising any connection time outs in your /etc/my.cnf:

    i cannot find this file only my.cnf.back which dont contain above but update_db_cache does so ive altered the following from and to
    interactive_timeout 40 - 80
    wait_timeout 8000 - 9000
    connect_timeout 15 - 20

    also edited the following


    max_allowed_packet (default) - 128M

    but no change
    can anyone help out
    im still learning so be gentle :)

    many thanks

    jack
     
  2. WhiteDog

    WhiteDog Well-Known Member

    Joined:
    Feb 19, 2008
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    I am receiving the EXACT same error since 2 days.
     
  3. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ive been told by my vps owners its a bug in cpanel so just sit and wait i suppose
    glad im not alone hehe
     
  4. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    I highly doubt that this is a bug in cpanel... or else alot more people would be posting about this.

    If I understand you correctly you cannot edit my.cnf at all?

    The my.cnf is located in the /etc folder. Is this not seen at all?
     
  5. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Well im in etc/ i have both my.cnf.back and my.cnf in ssh but the later is only a shortcut to myspeeddial icon on ftp /etc
    am i right ?
     
  6. tank

    tank Well-Known Member

    Joined:
    Apr 12, 2011
    Messages:
    236
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chicago, IL
    cPanel Access Level:
    Root Administrator
    I am confused? Myspeedial??? Not sure what you are saying.
     
  7. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    the only file in /etc named my.cnf is the speedial icon
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    If you are the root administrator for SSH on the machine, then please run this command in root SSH:

    Code:
    ls -lah /etc/my.cnf
    cat /etc/my.cnf
    Thanks!
     
  9. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ahh i found it

    i opened it in nano and there is only 3 lines


    [client]
    user="root"
    pass="n<****>f"

    shouldnt there be alot more ?

    regards
     
    #9 jack2012, Mar 30, 2012
    Last edited: Mar 30, 2012
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please post the return on both the commands I've noted, because it seems you've checked /root/.my.cnf rather than /etc/my.cnf file.
     
  11. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    yes i see now
    heres details

    root@server [~]# ls -lah /etc/my.cnf
    -rw-r--r-- 1 root root 684 Feb 28 2011 /etc/my.cnf
    root@server [~]# cat /etc/my.cnf
    # Optimized Configuration
    [mysqld]
    max_connections = 350
    key_buffer = 64M
    myisam_sort_buffer_size = 64M
    join_buffer_size = 8M
    read_buffer_size = 8M
    sort_buffer_size = 4M
    table_cache = 4000
    thread_cache_size = 286
    interactive_timeout = 50
    wait_timeout = 8000
    connect_timeout = 15
    max_allowed_packet = 32M <--- ( isit this line needs altering to 125m ?)


    max_connect_errors = 10
    query_cache_limit = 16M
    query_cache_size = 16M
    query_cache_type = 1
    tmp_table_size = 32M
    skip-innodb
    local-infile=0

    [mysqld_safe]
    open_files_limit = 8192

    [mysqldump]
    quick
    max_allowed_packet = 32M <--- ( isit this line needs altering to 125m ?)

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

    [mysqlhotcopy]
    root@server [~]#
     
    #11 jack2012, Apr 2, 2012
    Last edited: Apr 2, 2012
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    You might want to bump up the values per whatever you believe you should use.

    Please note that I am really confused by the entire thread. At one point, we were told about some myspeeddial icon and then later posted the contents of /root/.my.cnf rather than the clearly indicated /etc/my.cnf where I provided exact commands to run. If you had previously edited this file as your initial post stated, then the file's location would have been known. Also, you'd need to restart MySQL for any changes to take effect to that file (again, /etc/my.cnf).

    Basically, if you need system administrative assistance due to having issues navigating the file system to revise files, I would highly suggest hiring someone to help out:

    Sys Admin Services « Application Catalog

    Unfortunately, we can only do so much here on the forums for assistance in understanding which files to edit and how to edit those files.

    Thanks!
     
  13. jack2012

    jack2012 Member

    Joined:
    Mar 16, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    All sorted
    many thanks
     
Loading...

Share This Page