Skip to content
Lawsuit Help Desk

Lawsuit News Center

Decoding Magento's CPU Load Crisis: The Silent Culprit in Your Search Term Cache and How to Fix it

Decoding Magento’s CPU Load Crisis: The Silent Culprit in Your Search Term Cache and How to Fix it

Magento 2.3.4 and other versions have reported database CPU overloads due to long queries related to search term cache. The problematic query is linked to a distinct count on the search_query table with store_id equalling 1 and multiple search results. This issue heightens as site traffic grows, lengthening query times. The issue, however, is not limited to Magento 2.3.4 but also impacts other versions, suggesting a need for system refinement.

The advised solution involves removing the superfluous DISTINCT operator from queries within \Magento\Search\Model\ResourceModel\Query\Collection. Although this may lead to added workload and potential performance complications, it could enhance the query performance. Future changes to Magento's search functionality should include regular stress testing, active community participation, and system refinement to create a more efficient e-commerce platform.

Full article here: https://ipllfirm.com/all-insights/news-and-articles/decoding-magentos-cpu-load-crisis-the-silent-culprit-in-your-search-term-cache-and-how-to-fix-it/