Menu

An index is a cache with a schedule: Magento 2 indexers vs Laravel Scout
📰

An index is a cache with a schedule: Magento 2 indexers vs Laravel Scout

DEV Community: laravel·Nikita Sirenko·3 days ago
#HqwoXScu
#devtolaravel#devto#dev#index#reindex
Long article (1340 words) — no AI summary yet.
Reading 0:00
15s threshold

One index on a store I maintain had been stuck since 16 March, 17:00:34. I found it on 17 September, while deploying a security patch. For 6 months the only trace was one CRITICAL line a day in var/log/cron.log .

How an index freezes

Magento marks an index "working" when a full reindex starts and clears the mark when it ends. That mark in indexer_state is the lock, and it has no expiry and no stale detection. In March a reindex was killed at the OS level, mid-run, and the mark stayed behind. Every nightly indexer:reindex after that saw "working", assumed another process was busy, and skipped the index.

It belonged to an order-export module with no export profiles set up yet, so no exports were affected.

You can reproduce it on a fresh install in about a minute. In indexer_state , set the Stock index's status to working with one SQL UPDATE, and run bin/magento indexer:reindex cataloginventory_stock .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.