Since our upgrade to 2.2.1 the number of crons running for the webshop is getting higher and higher. It looks like a new cron instance is started while the old one is not finished yet;
USER PID %CPU %MEM VSZ RSS TTY Ss 18:56 0:05 /opt/plesk/php/7.0/bin/php -f httpdocs/bin/magento -- cron:run USER PID %CPU %MEM VSZ RSS TTY Ss 18:57 0:04 /opt/plesk/php/7.0/bin/php -f httpdocs/bin/magento -- cron:run USER PID %CPU %MEM VSZ RSS TTY Rs 18:58 0:03 /opt/plesk/php/7.0/bin/php -f httpdocs/bin/magento -- cron:run
I think the new instance should not start when there's already an instance running? Does anyone have a clue what's wrong or how to fix this?
Hi @wyrix,
Can you check if you have, currently, the configurations as the documentation recommends?
http://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html
Hi Damian,
Yes, they are setup as recommended except the fact that we log everything in the Plesk logs instead of custom log files;
httpdocs/bin/magento cron:run * * * * * httpdocs/update/cron.php * * * * * httpdocs/bin/magento setup:cron:run setup:cron:run * * * * *
I've found out that it looks like the same issue as mentioned here;
https://github.com/magento/magento2/issues/11002
I think running this query fixed it for me, but I will monitor it for a while to see if it's realy fixed now.
delete from cron_schedule where scheduled_at < date_sub(now(), interval 1 hour);
Hi @wyrix did running the query fixed the issue? I am having same issues.