When Magento slows down during peak traffic, two usual suspects show up: badly scheduled indexing and long queries locking critical tables.
What I check first in production:
- Indexer mode (schedule vs realtime).
- Cron backlog and real runtime per job.
- Active InnoDB locks under live traffic.
Quick hardening checklist:
1) Verify indexer mode
bin/magento indexer:show-mode
bin/magento indexer:set-mode schedule catalogsearch_fulltext catalog_category_product catalog_product_price
If a heavy indexer runs in realtime, every change pays that cost and frontend feels it.
2) Control cron concurrency
Avoid multiple workers reindexing the same index families. Define windows and limits to prevent process storms.
3) Measure locks, don’t guess
SHOW ENGINE INNODB STATUS\G
SELECT trx_id, trx_started, trx_query FROM information_schema.innodb_trx ORDER BY trx_started;
If you see long transactions touching catalog/inventory tables while traffic is high, that is your bottleneck.
4) Move heavy tasks out of commercial peaks
Full reindex, bulk imports, and feed generation should not compete with checkout during campaign hours.
5) Define an operational rollback
Before changing indexer/cron setup:
- logical backup
- config snapshot
- rollback plan under 15 minutes
Expected outcome
The goal is not “faster reindexing”, but reindexing without damaging the buying experience. In critical operations, stability beats heroics.
What I check first in production:
- Indexer mode (schedule vs realtime).
- Cron backlog and real runtime per job.
- Active InnoDB locks under live traffic.
Quick hardening checklist:
1) Verify indexer mode
bin/magento indexer:show-mode
bin/magento indexer:set-mode schedule catalogsearch_fulltext catalog_category_product catalog_product_price
If a heavy indexer runs in realtime, every change pays that cost and frontend feels it.
2) Control cron concurrency
Avoid multiple workers reindexing the same index families. Define windows and limits to prevent process storms.
3) Measure locks, don’t guess
SHOW ENGINE INNODB STATUS\G
SELECT trx_id, trx_started, trx_query FROM information_schema.innodb_trx ORDER BY trx_started;
If you see long transactions touching catalog/inventory tables while traffic is high, that is your bottleneck.
4) Move heavy tasks out of commercial peaks
Full reindex, bulk imports, and feed generation should not compete with checkout during campaign hours.
5) Define an operational rollback
Before changing indexer/cron setup:
- logical backup
- config snapshot
- rollback plan under 15 minutes
Expected outcome
The goal is not “faster reindexing”, but reindexing without damaging the buying experience. In critical operations, stability beats heroics.
Comments