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.

/usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache

Discussion in 'Database Discussions' started by johnsap, Aug 9, 2014.

  1. johnsap

    johnsap Registered

    Joined:
    Aug 9, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    when this cronjob is running:
    Cron <root@three> /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache

    i see this error:
    Code:
    DBD::mysql::st execute failed: Lost connection to MySQL server during query at /usr/local/cpanel/Cpanel/Exception.pm line 96
    Cpanel::Exception::new('Cpanel::Exception::Database::Error', 'Cpanel::ExceptionMessage::Raw=SCALAR(0x1338ea0)', 'HASH(0x243b710)') called at /usr/local/cpanel/Cpanel/Exception.pm line 47
    Cpanel::Exception::create('Database::Error', 'Cpanel::ExceptionMessage::Raw=SCALAR(0x1338ea0)', 'HASH(0x243b710)') called at /usr/local/cpanel/Cpanel/Exception.pm line 55
    Cpanel::Exception::create_raw('Database::Error', 'DBD::mysql::st execute failed: Lost connection to MySQL server d...', 'HASH(0x243b710)') called at /usr/local/cpanel/Cpanel/DBI.pm line 79
    Cpanel::DBI::_create_exception('Cpanel::DBI::Mysql::st=HASH(0x2422810)', 'DBD::mysql::st execute failed: Lost connection to MySQL server d...', undef) called at /usr/local/cpanel/Cpanel/DBI.pm line 70
    Cpanel::DBI::_error_handler('DBD::mysql::st execute failed: Lost connection to MySQL server d...', 'Cpanel::DBI::Mysql::st=HASH(0x2422810)', undef) called at bin/update_db_cache line 322
    Script::Update::DB::Cache::can_get_mysql_usage('HASH(0x13128f0)', 'HASH(0x13db990)', 'Cpanel::DB::Map::Collection::Index=HASH(0x207a630)') called at bin/update_db_cache line 57
    Script::Update::DB::Cache::script('Script::Update::DB::Cache') called at bin/update_db_cache line 32

    there is one database that even i terminate it's cpanel account but db doesn't deleted and even i tried to drop it from ssh by below command :
    DROP DATABASE dbname;
    but i see this error:
    Code:
    ERROR 2013 (HY000): Lost connection to MySQL server during query
    because update_db_cache couldn't run some databases show error after 24 hour.

    Could you please help me to solve this problem?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Does /tmp/mysql.sock exist on this system? If not, please ensure you create that symbolic link via:

    Code:
    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    Also, check /var/lib/mysql/$hostname.err when restarting MySQL to see if you notice any errors.

    Thank you.
     
  3. johnsap

    johnsap Registered

    Joined:
    Aug 9, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yes i checked symlink and file exist

    This is mysql error log after cronjob error:

    Code:
    InnoDB: Error: tried to read 16384 bytes at offset 0 49152.
    InnoDB: Was only able to read 8192.
    140808 17:17:27  InnoDB: Operating system error number 0 in a file operation.
    InnoDB: Error number 0 means 'Success'.
    InnoDB: Some operating system error numbers are described at
    InnoDB: [url=http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html]MySQL :: MySQL 5.5 Reference Manual :: 14.21.6 Operating System Error Codes[/url]
    InnoDB: File operation call: 'read'.
    InnoDB: Cannot continue operation.
    140808 17:17:27 mysqld_safe Number of processes running now: 0
    140808 17:17:27 mysqld_safe mysqld restarted
    140808 17:17:27 [Warning] option 'slow_query_log': boolean value '/var/lib/mysql/slow.log' wasn't recognized. Set to OFF.
    140808 17:17:27 [Note] Plugin 'FEDERATED' is disabled.
    140808 17:17:27 InnoDB: The InnoDB memory heap is disabled
    140808 17:17:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    140808 17:17:27 InnoDB: Compressed tables use zlib 1.2.3
    140808 17:17:27 InnoDB: Using Linux native AIO
    140808 17:17:27 InnoDB: Initializing buffer pool, size = 128.0M
    140808 17:17:27 InnoDB: Completed initialization of buffer pool
    140808 17:17:27 InnoDB: highest supported file format is Barracuda.
    InnoDB: Log scan progressed past the checkpoint lsn 188797891627
    140808 17:17:27  InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    InnoDB: Doing recovery: scanned up to log sequence number 188797899922
    140808 17:17:29  InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percents: 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78$
    InnoDB: Apply batch completed
    InnoDB: Last MySQL binlog file position 0 69024870, file name /var/lib/mysql/updates.000009
    140808 17:17:29  InnoDB: Waiting for the background threads to start
    140808 17:17:30 InnoDB: 5.5.37 started; log sequence number 188797899922
    140808 17:17:30 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    140808 17:17:30 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    140808 17:17:30 [Note] Server socket created on IP: '0.0.0.0'.
    140808 17:17:31 [Note] Event Scheduler: Loaded 0 events
    140808 17:17:31 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.37-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. johnsap

    johnsap Registered

    Joined:
    Aug 9, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    This is My.cnf

    - - - Updated - - -

    also i don't know why max_allowed_packet is set automatically to 268435456

    every time i change it to 50M but it will change automatically.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...

Share This Page