Why Magento depends on it
Magento 2.4 removed MySQL search. Category listings, layered navigation and search results all come from the search engine index, built by the catalogsearch_fulltext indexer. Product pages and the checkout read from MySQL, so they keep working.
| Page | Source | When the engine is down |
|---|---|---|
| Search results | OpenSearch | Error or no results |
| Category pages | OpenSearch | “We can’t find products matching the selection” |
| Product page | MySQL | Works |
| Cart and checkout | MySQL | Works, if shoppers can find a product |
How it fails
The usual causes are an OpenSearch process killed for memory, a service that did not start after a reboot, an index that was never rebuilt after an upgrade, and the full disk. When the disk passes the flood-stage watermark, 95% by default, OpenSearch makes the indices read-only. Reindexing then fails and new products never appear.
With read_only_allow_delete set, searches may still answer from the old index while every update fails. The catalog slowly drifts from the database.
Check it
# Which engine and host does Magento use?
bin/magento config:show catalog/search/engine
bin/magento config:show catalog/search/opensearch_server_hostname
# Is the cluster up? green or yellow is fine on a single node
curl -s "localhost:9200/_cluster/health?pretty"
# Disk per node, and indices blocked by the watermark
curl -s "localhost:9200/_cat/allocation?v"
curl -s "localhost:9200/_all/_settings/index.blocks*?pretty"opensearch_server_hostname becomes elasticsearch7_server_hostname on Elasticsearch.Fix it
- Free disk space first. Logs, old backups and
var/reportare the usual space hogs. - Remove the read-only block. Recent versions release it on their own once usage drops below the high watermark; older ones need the call below.
- Rebuild the search index. Then check a category page as a new visitor.
curl -s -XPUT "localhost:9200/_all/_settings" -H "Content-Type: application/json" \
-d '{"index.blocks.read_only_allow_delete": null}'
bin/magento indexer:reindex catalogsearch_fulltext
bin/magento cache:flushWhat to watch
Watch the cluster health, the disk on the search node and the indexer status, and run a check that opens a category page before it adds a product. A check that starts from a product URL never notices an empty catalog. Related: Magento cron and indexers and checkout breaks after a deploy.
Check your own store now with the free Magento checkout test: it walks the checkout in a real browser and shows the step where it stops.
Find out your checkout broke before your customers do.
Real checkout checks for Magento and WooCommerce · free plan · no card requiredMagento checkout monitoring →