Scheduler jobs are not running. This problem seemed to surface after a hardware upgrade (Synology DSM 5 -> DSM 6.2) and an update from v7.8 to v7.10, although I’m not sure precisely when.
Current versions:
SuiteCRM v7.10.7
Apache 2.4
PHP 7.0
SuiteCRM AOP and AOD are disabled via the Admin menu.
Performed Admin - Rebuild Schedulers
Performed Quick repair and rebuild
The crontab file appears to be correct.
I restarted the server to provide a clean break for the system logs.
Logging crond shows a call to cron.php every minute, which looks proper to me:
No error message. Apparently it just quits at the return from DBManagerFactory. This is really strange, since most of the rest of SuiteCRM seems to work ok.
Most of the time this call works fine. However, when called via cron.php, it not only fails to connect, but improperly returns, and instead of executing the next php statement, it ends up wandering around and re-entering getInstance from the top.
AFAIK, all other SuiteCRM functions that use the database are working, so it would seem that config.php is correctly configured
Problem solved.
When updating the Synology server (both hardware and DSM), PHP 7.0 was automatically added. SuiteCRM is running on php5.6, but it appears that when cron executes a command, php70 is used. This appears to have corrupted the stack somehow, so calls to subroutines did not return properly.
The fix: put this line in crontab, to force use of php56
cd /volume1/web/sugarcrm; php56 -f cron.php > /dev/null 2>&1
Other weirdness: executing php -v from the shell resulted in version 5.6 being returned, but executing the command the original
php -f cron.php
from the command line did not work; but
php56 -f cron.php
does work from the command line.
SuiteCRM is recommended to run on php7, but none of the Synology controls appear to allow it.
More info:
The problem is not PHP7; rather, Synology uses php 5.6.11 for the shell and cron, and packages, including SugarCRM/SuiteCRM use php 5.6.36, which is the version installed as a package.
So the problem is an incompatibility between which php5.6 versions are used. My suggestion above fixes the problem.
Synology responds:
This php 5.6 behavior is intended
There is no documentation describing it.
There is no plan to change it.
There is no plan to allow the user to change php version bindings for packages. Once installed as php5.6, you cannot change to php7.0, even if the package would otherwise allow it.