문제

I was curious what would happen if I stopped the Elasticsearch service in Magento 2.4. What I found I cant seem to understand.

When the service is stopped it empties all the categories. I would have assumed Elasticsearch was for the mini search/advanced search not the catalog listings.

Can anyone confirm if this is by design or is there a bug in Magento 2.4? Also any ideas on how to fix this?

My setup is Magento 2.4 on Valet (MacOs/PHP 7.3.20). I installed Elasticsearch via Homebrew.

Elasticsearch running With Elasticsearch running

Elasticsearch stopped With Elasticsearch stopped

도움이 되었습니까?

해결책

ElasticSearch is in charge of the entire catalog and search, provisioning the data to Magento 2.4.

ElasticSearch is a requirement in Magento 2.4, as you can see in the page Magento 2.4 technology stack requirements, so it never can be disabled like in Magento 2.3.

I recommend to set the services to auto-restart in a production server, so if ElasticSearch or MySQL service goes down, it will restart automatically. You can do it in Docker using the parameter below.

docker run --restart=always
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top