Hi, We have Magento 2.4.3-p1 at cloudways and it's working fast but cron causes CPU spikes every time it runs.
I have understood that Magento cron should run every minute, but does it make any harm to run it only every 5 minutes, for example?
Does this mean that lots of cron jobs will be missed?
I also wondered if it is normal to have lots of duplicate rows at Cron_schedule table, like 15 rows for:
consumers_runner pending
Is this because cron is run every minute but settings for consumers_runner is:
Generate Schedules Every 15
Schedule Ahead for 20
Missed if not Run Within 15
So does this make a new line every minute and then it is run every 15 minutes?
So what would best interval for Cron at the server and what admin settings would cause fewer CPU spikes?
Interested to know as well. I'm also using Cloudways but with Magento 2.4.2. Lot of CPU spikes. If you change cron to run every 15 minutes instead of every minute, some jobs will be missed and some indexes will be invalid. Causes the search box to return no results and some category pages to display no products. I had to revert to run every minute.
Did you find a solution?
Try to give more memory
php -d memory_limit=2G bin/magento cron:run
-d memory_limit=2G: This sets the memory limit to 2 gigabytes for this specific command execution.
You can adjust 2G to any value that suits your server capacity (e.g., 512M, 1G, 4G).
Running Magento cron every 5 minutes is usually fine it won’t harm much unless you rely on real-time updates. The duplicate consumers_runner rows are normal since Magento queues them ahead. You can also try optimizing or monitoring CPU usage with tools like Y999 Game, which helps track performance spikes more clearly.
Magento’s cron jobs are essential for automating tasks like reindexing, cache cleaning, sending emails, and generating reports. However, when the cron schedule is misconfigured or overloaded, it can lead to unusually high CPU usage of best soccer picks, slowing down the server and affecting website performance. This often happens when multiple cron jobs run simultaneously, when there’s a backlog of pending tasks, or when poorly optimized custom scripts are included in the cron schedule.
High CPU usage caused by Magento’s cron schedule often points to an overloaded or misconfigured cron process, typically when too many tasks run simultaneously or when heavy jobs aren’t optimized. To keep performance stable, start by reviewing the cron_schedule table to identify jobs that are stuck, repeatedly failing, or running too frequently. Make sure you have the recommended Nissan Rogue Years to Avoid three-cron setup (cron:run, update/cron, setup/cron) and space them out using proper crontab timing.
A high CPU load caused by Magento’s cron schedule often points to a backlog of pending or overlapping tasks that are fighting for system resources. When crons like indexer_reindex_all_invalid, sales_report, or catalog_product_attribute stack up—often due to slow database queries of Noelle Watters’ Marriage to Jesse Watters, insufficient hardware, or misconfigured intervals—the server can become overwhelmed.