Skip to content

How to Solve: “Could not acquire lock for cron job: X” in Magento var/log/cron.log

With my M2 instance indexers in “Update on Schedule” mode… var/log/cron.log receives this warning near constantly:

Could not acquire lock for cron job: indexer_update_all_views [] []

The cron process in the process list terminates… plus I have a constant “X in the backlog” message for a few indexes.

I cannot figure out what this problem is about… I’ve tried truncating all *_cl tables and rebuilding the index… but still the site eventually goes back to items permanently stuck the backlog, a cron job not terminating, and this log message always appearing.

The only solution I have right now to restore the site’s performance is to leave the indexer in Update on Save mode.

Thoughts?