Hello,
We have a problem at a server which is utilizing so much CPU so that the website is really slow.
I checked the server, logs, magento logs, and it seems its caused by the cron-jobs of magento.
I guess its related to this issue, though we have 2.3.0 here:
https://github.com/magento/magento2/issues/11002
as stated here,
https://www.splendid-internet.de/blog/cronjob-bug-in-magento-2-2-x-fuehrt-zu-hoher-cpu-auslastung/
I tried to
select count(*) from cron_schedule;
but
delete from cron_schedule where scheduled_at < date_sub(now(), interval 1 day);
did not change the value which was 1403 and also did not fix the server load...
I hope somebody has an idea whats causing this.
here are the log files, if any help
/var/log/syslog output : pastebin.com/xsWDQNkC
var/log/system.log : pastebin.com/EdfjN48t
var/log/magento.cron.log : pastebin.com/0H5Y44NT
I found these on Github, which one should be preferred?
Magento 2 cron project to fix bugs and common cron issues.
github.com/magemojo/m2-ce-cron
Plugin to Magento 2 which mark old cron jobs with status "running" as error. This can prevent the Magento 2 from consuming CPU
github.com/Alekseon/CleanRunningJobs
What is your cache status?
If it is disabled (which is default) then even loading a normal page will be super slow on a powerful server. Enable cache and check.
Run:
bin/magento cache:enable
Incase you cannot access admin panel because it is too slow