1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron <root@srv> /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache

Discussion in 'General Discussion' started by sulnet, May 14, 2010.

  1. sulnet

    sulnet New Member

    Joined:
    Feb 11, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    How to fix it?

    DBD::mysql::st execute failed: Lost connection to MySQL server during query at /scripts/update_db_cache line 48.
    DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /scripts/update_db_cache line 49.
     
  2. WiredTree Joe

    WiredTree Joe Member

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    What happens when you try to run:

    Code:
    /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache
    manually via command line?
     
  3. sulnet

    sulnet New Member

    Joined:
    Feb 11, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    root@srv [~]# /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache
    DBD::mysql::st execute failed: Lost connection to MySQL server during query at /scripts/update_db_cache line 48.
    DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /scripts/update_db_cache line 49.
     
  4. WiredTree Joe

    WiredTree Joe Member

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    Try raising any connection time outs in your /etc/my.cnf:

    interactive_timeout
    wait_timeout
    connect_timeout
    etc...

    save the changes and restart mysql and run the command again.

    MySQL :: MySQL 5.0 Reference Manual :: B.5.2.9 MySQL server has gone away
     
  5. WiredTree Joe

    WiredTree Joe Member

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    Just a follow up on this. We have seen some client's servers kick out this error:

    Code:
    Subject: Cron /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache
    
    DBD::mysql::st execute failed: Out of memory (Needed 4194756 bytes) at /scripts/update_db_cache line 48.
    DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /scripts/update_db_cache line 49.
    and we have fixed it by raising this value:

    Code:
    max_allowed_packet = 128M
    in /etc/my.cnf and restarting mySQL. Running /usr/bin/test -x /scripts/update_db_cache && /scripts/update_db_cache after the adjustment to mySQL caused it to run finish without issue.
     

Share This Page