Skip to main content
Magento 2

Magento 2 – cron job not running – reindex issue

By September 29, 2017June 27th, 2019No Comments

I was having an issue with Magento 2 cron jobs.

They seemed to be configured correctly, but every morning I got the CMS admin alert that they need to be run. The client also reported that new products didn’t appear in the frontend after saving. A sign that the database wasn’t reindexing.

/bin/sureserver-cron.sh was trying to run every 15minutes, but further investigation showed the cron script wasn’t completing.

 

Check the cron logs

/var/log/update.cron.log

/var/log/setup.cron.log

 

Magento 2 cron error

[2017-09-25 09:28:10] setup-cron.ERROR: Your current PHP memory limit is 400M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php –ini tells you where it is located.) After that, restart your web server and try again. [] []

 

Cron Fix

Raising the memory limit to 800 MB in the global php.ini solved the issue and allowed the cron script to complete.

Andrew Taylor

A senior UI designer with over 25 years of web design and web development experience working for some of the largest companies in the UK. An expert in all things Magento and WordPress.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.