magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.59k stars 9.32k forks source link

Allowed memory size exhausted due to No such entity exception #37594

Closed Bilalyounas1234 closed 1 year ago

Bilalyounas1234 commented 1 year ago

Summary

After upgrading the Magento version to 2.4.3p1 we are facing (No such entity exception) issues and due to this our server goes down and then we need to restart all services. We checked some time this error occurs while product search sometimes on checkout and sometimes on any other request.

Logs in nginx due to this issue:

[error] 107960#107960: 3469139 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4194312 bytes) in /data/site/vendor/magento/framework/Exception/NoSuchEntityException.php on line 50" while reading response header from upstream, request: "GET /en/catalogsearch/result/?q=Prime HTTP/1.1", upstream: "fastcgi://127.0.0.1:9004", host: "site", referrer: "https://site/en/catalogsearch/result/?q=Sunscreen+" [error] 107960#107960: 3469131 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4194312 bytes) in /data/site/vendor/magento/framework/Exception/NoSuchEntityException.php on line 50" while reading response header from upstream, request: "GET /en/popup/ajax/addCookie/?isAjax=true&form_key=RYfvz8vlQ4fNnbG4&cookie_type=aw_popup_viewed_page&current_url=https%3A%2F%2Fsite%2Fen%2Fcms%2Findex%2Findex%2F HTTP/1.1", upstream: "fastcgi://127.0.0.1:9004", referrer: "https:/site/site/en/"

Examples

[error] 107960#107960: 3469139 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4194312 bytes) in /data/site/vendor/magento/framework/Exception/NoSuchEntityException.php on line 50" while reading response header from upstream, request: "GET /en/catalogsearch/result/?q=Prime HTTP/1.1", upstream: "fastcgi://127.0.0.1:9004", host: "site", referrer: "https://site/en/catalogsearch/result/?q=Sunscreen+" [error] 107960#107960: 3469131 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4194312 bytes) in /data/site/vendor/magento/framework/Exception/NoSuchEntityException.php on line 50" while reading response header from upstream, request: "GET /en/popup/ajax/addCookie/?isAjax=true&form_key=RYfvz8vlQ4fNnbG4&cookie_type=aw_popup_viewed_page&current_url=https%3A%2F%2Fsite%2Fen%2Fcms%2Findex%2Findex%2F HTTP/1.1", upstream: "fastcgi://127.0.0.1:9004", referrer: "https:/site/site/en/"

Proposed solution

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @Bilalyounas1234. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 1 year ago

Hi @Bilalyounas1234,

Thank you for reporting and collaboration.

Please try to increase memory size. your PHP.ini settings, in this case is the memory_limit

use this commands

php -dmemory_limit=-1

bin/magento setup:di:compile

bin/magento setup:static-content:deploy

Kindly let us know if you are still facing any issue.

Thanks.

engcom-Bravo commented 1 year ago

Hi @Bilalyounas1234,

Please provide us latest update on this comment https://github.com/magento/magento2/issues/37594#issuecomment-1584038647 and if you are still facing any issue kindly refer this document https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/php-settings.html?lang=en regarding PHP settings.

Thanks.

engcom-Bravo commented 1 year ago

Hi @Bilalyounas1234,

We have noticed that this issue has not been updated since long time.
Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.