Question - Daily cron failures

If for whatever reason the daily cron fails to run then daily cron will never complete successfully in future runs because the AutoUpdateCron job checks system health which is red due to the previously missed daily cron. Only way to get around this is to manually update the cron database record to fake a pass.

Starting Cron Task - AutoUpdateCron
2020-09-28 12:06:45 Error: [CronException] Since there seem to be system errors (on the linux system were this eramba runs) we cant let you update the system. Visit the System Health page check for details on what could be wrong.
Stack Trace:
#0 /var/www/html/app/Lib/AutoUpdateLib.php(185): AutoUpdateLib->setError(‘Since there see…’)
#1 /var/www/html/app/Lib/AutoUpdateLib.php(196): AutoUpdateLib->checkSystemHealth()
#2 /var/www/html/app/Controller/Crud/Listener/AutoUpdateCronListener.php(32): AutoUpdateLib->check(Object(stdClass))
#3 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(293): AutoUpdateCronListener->daily(Object(CakeEvent))
#4 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(206): CronShell->_executeTask(‘daily’, ‘AutoUpdateCronL…’, ‘18113’)
#5 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(140): CronShell->_runTasks(‘daily’, ‘18113’)
#6 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(103): CronShell->_job(‘daily’)
#7 /var/www/html/lib/Cake/Console/Shell.php(459): CronShell->job()
#8 /var/www/html/lib/Cake/Console/ShellDispatcher.php(222): Shell->runCommand(‘job’, Array)
#9 /var/www/html/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#10 /var/www/html/app/Console/cake.php(37): ShellDispatcher::run(Array)
#11 {main}
Task: AutoUpdateCron
Status: Error
Message: CRON task “AutoUpdateCron” failed to process with error: Since there seem to be system errors (on the linux system were this eramba runs) we cant let you update the system. Visit the System Health page check for details on what could be wrong.

Can you try to run system health command?
image
Is it possible that your php.ini files for cli and apache are not the same?

The first test passes OK.

The second reports max_execution_time isn’t set correctly but this is expected as php cli sets max_execution_time to 0.
The only other error is the fact that daily cron hasn’t run.

The php.ini files are the same as I have the file in the app root and both apache and the CLI pick up the same php.ini file

The problem is max execution time i think. On centos and Rhel php.ini are same for cli and apache but on ubuntu there are two of them. Daily cron is not checking itself, if it runs successfully it will just change state to OK.

I’m running in the docker php-apache container which is based off Debian. From https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time you can see that when running from the CLI max_execution_time is 0. 0 is a special value which means unlimited so if you aren’t explicitly checking for this then your check will fail but this exact config has been running up until now so I don’t think its a php setting issue. It just happened to miss a run because of a misconfiguration on an AWS security group denying access to the database.

I recently had this same issue and the cause was that Apache was using the incorrect version of PHP. Setting it to use the correct version solved the problem.