Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2004
    Posts
    102

    Default pkgacct - Check load & MySQL to prevent MySQL timeouts.

    Hi,

    a problem I experience on a regular basis is that when I create a backup the server's load gets high and then when the pkgacct script tries to backup MySQL databases I get a timeout or the MySQL server is just down. Then you have to do the entire backup all over.

    I would be so glad if you could rewrite the script to check the load prior to backing up MySQL databases and also check if MySQL is actually functional.

    Grabbing mysql dbs..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Timeout: Alarm at /usr/local/cpanel/bin/mysqladmin line 24.

    Like one time we lost a hard drive and then ran into a large amount of issues with missing MySQL content since the backup was missing MySQL databases that had timed out during the backup process was operating.

    Thanks !

  2. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by driverC View Post
    Hi,

    a problem I experience on a regular basis is that when I create a backup the server's load gets high and then when the pkgacct script tries to backup MySQL databases I get a timeout or the MySQL server is just down. Then you have to do the entire backup all over.

    I would be so glad if you could rewrite the script to check the load prior to backing up MySQL databases and also check if MySQL is actually functional.

    Grabbing mysql dbs..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Timeout: Alarm at /usr/local/cpanel/bin/mysqladmin line 24.

    Like one time we lost a hard drive and then ran into a large amount of issues with missing MySQL content since the backup was missing MySQL databases that had timed out during the backup process was operating.

    Thanks !
    The extra CPUs load threshold may be adjusted to account for issues involving higher than normal load; this may be configured via the Tweak Settings page in WHM, as seen at the following menu path:
    WHM: Main >> Server Configuration >> Tweak Settings >> Stats and Logs
    • The load average above the number of CPUs at which logs file processing should be suspended (default 0)

    Have you tried adjusting the aforementioned configuration option? The setting will also apply to the automated cPanel backup ("cpbackup") process. Using the stock-default value of zero ("0") should help avoid the described issue during backups, but in cases where high load is often expected a lower extra CPUs threshold may delay cpbackup completion and or delay cpanellogd processing of logs (e.g., for stats).

    Regarding the request to see if MySQL is functional, is there a certain way you would like to see the feature implemented, and is there any special criteria that you would like checked when testing MySQL?

    If MySQL is determined to be unavailable, what specific action(s) would you like to have occur?

    Please note that recurring issues with MySQL timeouts should be investigated and corrected by the appropriate Systems Administration personnel to ensure MySQL remains responsive as it is abnormal to have this type of issue frequently occurring.

  3. #3
    Member
    Join Date
    Jul 2004
    Posts
    102

    Default

    The load check in pkgacct appears to be quite unreliable probably because it does not check the load frequently enough.

    So my idea was to implement a load check right before it does the MySQL backup. If the load is too high wait for the load to go down to continue.

    To check the MySQL status you could do a simple "service mysql status" and see if it returns an "OK". If not wait for a few seconds. Then retry. If it does not work after a certain amount of retries skip the MySQL backup and add a note to the logfile.

Similar Threads & Tags
Similar threads

  1. mysql & HIGH server load, please help
    By SoftDux in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 03-06-2007, 05:13 AM
  2. MySQL & Server Load
    By celliott in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-19-2006, 09:36 PM
  3. mysql db size/timer (for timeouts)
    By kerriritter in forum Database Discussions
    Replies: 6
    Last Post: 10-30-2004, 08:02 PM
  4. MYSQL 4 Problem & Server Load
    By hugo24 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-07-2003, 07:36 AM
  5. mysql timeouts
    By DuncanMcLord in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-13-2002, 06:12 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube