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.55k stars 9.32k forks source link

Maximum execution time of 60 seconds exceeded & Allowed memory size of bytes exhausted #36834

Closed sanjaykesari28 closed 1 year ago

sanjaykesari28 commented 1 year ago

Preconditions and environment

Hello Team, We are using magento version - 2.4.5-p1 and 2.10 version of smile elasticsuite. In new relic log, we are getting below error continuously. Please help to fix this issue

Error class: E_ERROR Transaction name: unknown Error message Maximum execution time of 60 seconds exceeded URL host: www.jaspal.com URL Path: /en/catalogsearch/result/index/ Stack Trace in GuzzleHttp\Ring\Client\CurlFactory::GuzzleHttp\Ring\Client{closure} called at ? (?) in curl_exec called at /app/fpkici6hpuyvi/vendor/ezimuel/ringphp/src/Client/CurlHandler.php (89) in GuzzleHttp\Ring\Client\CurlHandler::_invokeAsArray called at /app/fpkici6hpuyvi/vendor/ezimuel/ringphp/src/Client/CurlHandler.php (68) in GuzzleHttp\Ring\Client\CurlHandler::__invoke called at /app/fpkici6hpuyvi/vendor/ezimuel/ringphp/src/Client/Middleware.php (30) in GuzzleHttp\Ring\Client\Middleware::GuzzleHttp\Ring\Client{closure} called at /app/fpkici6hpuyvi/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php (265) in Elasticsearch\Connections\Connection::Elasticsearch\Connections{closure} called at /app/fpkici6hpuyvi/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php (241) in Elasticsearch\Connections\Connection::performRequest called at /app/fpkici6hpuyvi/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php (110) in Elasticsearch\Transport::performRequest called at /app/fpkici6hpuyvi/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/AbstractNamespace.php (63) in Elasticsearch\Namespaces\AbstractNamespace::performRequest called at /app/fpkici6hpuyvi/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php (79) in Elasticsearch\Namespaces\IndicesNamespace::analyze called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-core/Client/Client.php (199) in Smile\ElasticsuiteCore\Client\Client::analyze called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Model/Index.php (229) in Smile\ElasticsuiteThesaurus\Model\Index::getSynonymRewrites called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Model/Index.php (135) in Smile\ElasticsuiteThesaurus\Model\Index::computeQueryRewrites called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Model/Index.php (110) in Smile\ElasticsuiteThesaurus\Model\Index::getQueryRewrites called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Plugin/QueryRewrite.php (131) in Smile\ElasticsuiteThesaurus\Plugin\QueryRewrite::getWeightedRewrites called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Plugin/QueryRewrite.php (88) in Smile\ElasticsuiteThesaurus\Plugin\QueryRewrite::aroundCreate called at /app/fpkici6hpuyvi/vendor/magento/framework/Interception/Interceptor.php (135) in Smile\ElasticsuiteCore\Search\Request\Query\Fulltext\QueryBuilder\Interceptor::Magento\Framework\Interception{closure} called at /app/fpkici6hpuyvi/vendor/magento/framework/Interception/Interceptor.php (153) in Smile\ElasticsuiteCore\Search\Request\Query\Fulltext\QueryBuilder\Interceptor::___callPlugins called at /app/fpkici6hpuyvi/generated/code/Smile/ElasticsuiteCore/Search/Request/Query/Fulltext/QueryBuilder/Interceptor.php (23) in Smile\ElasticsuiteCore\Search\Request\Query\Fulltext\QueryBuilder\Interceptor::create called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Query/Builder.php (119) in Smile\ElasticsuiteCore\Search\Request\Query\Builder::createFulltextQuery called at /app/fpkici6hpuyvi/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Query/Builder.php (84)

Steps to reproduce

We are getting this error into new relic report

Expected result

Please help to fix this issue

Actual result

Please help to fix this issue

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @sanjaykesari28. 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-November. 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-November commented 1 year ago

Hi @sanjaykesari28 , Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance as per System requirements installed and the issue is not reproducible. Connection to new relic is successful and no errors observed in both new relic logs and Magento logs. image Smile elasticsuite is a 3rd party intergration. Kindly check if the issue caused due to 3rd party modules and recheck the issue on Magento 2.4-develop instance as per Magento system requirements and provide missing steps if any if the issue is still reproducible. Thank you.

sanjaykesari28 commented 1 year ago

Hello Support, Thanks for update. Kindly find the below screenshot, we could see more no.of errors getting triggered from 24th Dec 2022 for the transaction unknown and catalogsearch/result/index 9e0112f3-95cb-49e5-86ee-798f894a8326

engcom-November commented 1 year ago

Hi @sanjaykesari28 Thank you for the response. Verified the issue again on Magento 2.4-develop instance by performing additional operations ex: Reindexing, cache flush, graphql operations, placing order etc but above mentioned error is not reproducible in the logs. Kindly recheck the issue on Magento 2.4-develop instance and provide missing steps if any if the issue is still reproducible. image image image

sanjaykesari28 commented 1 year ago

Hello Support,

Thanks for update. As we are using cloud edition so we can not test this fresh magento setup. We have already shared our newrelic setup screenshot and in screenshot we can see this error is coming. May be this issue is occurring due to large catalog size. Please suggest if we can fix this error in our magento setup by increase php max execution time OR any other php/mysql global variable value. We really need to fix this ASAP. Quick reply would be appreciated. Thanks

engcom-November commented 1 year ago

Hi @sanjaykesari28 ,

Thank you for the response. For the error ""PHP Fatal error: "Maximum execution time of 60 seconds exceeded in…", you can update the maximum execution time by setting a custom max_execution_time value in your php.ini file and redeploying. Kindly refer the Magento devdocs - Common PHP Fatal Errors and solutions with example solutions that may help resolve your issue. For the error: "Fatal error: Allowed memory size of .. bytes exhausted..", try running the following commands or refer the devdocs for PHP settings.

php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento setup:di:compile php bin/magento cache:flush php bin/magento cache:clean

/To Run Command Forcefully / php -f bin/magento

/To run command with memory limit 4G/ php -d memory_limit=4G bin/magento

/To run command with max memory limit / php -d memory_limit=-1 bin/magento

Thank you.

engcom-November commented 1 year ago

Hi @sanjaykesari28 , We are closing this issue as there has been no latest update on the same. Kindly reopen / create new issue if you are still facing any issues. Thank you.