When does maintenence happen?

Scott Galambos

Well-Known Member
Jul 13, 2016
122
8
68
Canada
cPanel Access Level
Root Administrator
We have a problem with cPanel maintenance timing . We have scripts that sync products in the middle of the night. most of the time its fine. Occasionally though cPanel has to shut down MySQL and our scripts fails. this is bad.

eg. Fatal error: Uncaught PDOException: SQLSTATE[08S01]: Communication link failure: 1053 Server shutdown in progress in /home/site/public_html/asite.com/cron/product_sync/includes/engine_functions.inc:78

The question is, exactly when does MySQL go offline? For how long? We can probably time/cron around this downtime if I knew when it happened.
This is under cPanel & WHM v102.0.11.

Any idea?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,793
1,878
363
cPanel Access Level
Root Administrator
Hey there! All maintenance would be called as part of the nightly update script. The time that runs is controlled by a root cron job, so you can see that by accessing root's crontab on the server. Here's the entry you'll be looking for:

Code:
(/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null)
Feel free to modify that time so it runs when it is convenient for your server and users.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,668
341
438
Finland
cPanel Access Level
Root Administrator
You can modify that time in WHM -> Server Configuration -> Configure cPanel Cron Jobs -> Command: upcp
 

Scott Galambos

Well-Known Member
Jul 13, 2016
122
8
68
Canada
cPanel Access Level
Root Administrator
Ok, from my root cron I got this:

0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1
30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1
32 1 * * * (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null)
0 2 * * * /usr/local/cpanel/bin/backup
35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache
30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
25 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1
49 2 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
11,26,41,56 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
@reboot /usr/local/cpanel/bin/onboot_handler
5,20,35,50 * * * * /usr/local/cpanel/scripts/eximstats_spam_check 2>&1
0 */2 * * * /usr/local/cpanel/scripts/shrink_modsec_ip_database -x 2>&1

Does anyone know exactly what jobs might take down MySQL? Just "/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp" then?

On a separate note, every time I click the CODE button in this editor I get a popup forum listing. Why? Why can't I ever select text to be code? I keep getting this stupid popup
at Upload and share screenshots and images - print screen online | Snipboard.io ??
 

Spirogg

Well-Known Member
Feb 21, 2018
700
157
43
chicago
cPanel Access Level
Root Administrator
Ok, from my root cron I got this:

0 6 * * * /usr/local/cpanel/scripts/exim_tidydb > /dev/null 2>&1
30 5 * * * /usr/local/cpanel/scripts/optimize_eximstats > /dev/null 2>&1
32 1 * * * (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null)
0 2 * * * /usr/local/cpanel/bin/backup
35 * * * * /usr/bin/test -x /usr/local/cpanel/bin/tail-check && /usr/local/cpanel/bin/tail-check
45 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_mailman_cache && /usr/local/cpanel/scripts/update_mailman_cache
30 */4 * * * /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
25 */2 * * * /usr/local/cpanel/bin/mysqluserstore >/dev/null 2>&1
15 */2 * * * /usr/local/cpanel/bin/dbindex >/dev/null 2>&1
15 */6 * * * /usr/local/cpanel/scripts/autorepair recoverymgmt >/dev/null 2>&1
*/5 * * * * /usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1
49 2 * * * /usr/local/cpanel/whostmgr/docroot/cgi/cpaddons_report.pl --notify
11,26,41,56 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
@reboot /usr/local/cpanel/bin/onboot_handler
5,20,35,50 * * * * /usr/local/cpanel/scripts/eximstats_spam_check 2>&1
0 */2 * * * /usr/local/cpanel/scripts/shrink_modsec_ip_database -x 2>&1

Does anyone know exactly what jobs might take down MySQL? Just "/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp" then?

On a separate note, every time I click the CODE button in this editor I get a popup forum listing. Why? Why can't I ever select text to be code? I keep getting this stupid popup
at Upload and share screenshots and images - print screen online | Snipboard.io ??
The poop forum listing is an issue that we reported already supposed to get fixed. When not sure
But you can do
[ code ]
Your test copy paste here
[ /code ]
Make sure there is no space between [ and code ]
Same for [ /code ]
Hope this helps :)
 

Spirogg

Well-Known Member
Feb 21, 2018
700
157
43
chicago
cPanel Access Level
Root Administrator
The poop forum listing is an issue that we reported already supposed to get fixed. When not sure
But you can do
[ code ]
Your test copy paste here
[ /code ]
Make sure there is no space between [ and code ]
Same for [ /code ]
Hope this helps :)
@cPRex I posted this In The wrong thread. You can delete it. Sorry