2G of memory may not be enough for some shops, depending on corner cases like 4k products in one subcategory in your case. You need to adjust PHP and, maybe, MySQL settings (like max_allowed_packet) according to needs of your shop.
@orlangur I change the memory_limit to 3G and max_allowed_packet to 524288000, but the problem not solve.
No need to change max_allowed_packet until it fails... 3G of memory is not too much. Could you try some 8G - 16G just to see if it is able to finish? I'm not saying 16G is acceptable as permanent solution, just trying to understand scale of the problem.
This might be related to https://github.com/magento/magento2/issues/4231, but I'm not very sure if saving a category also uses the 'Magento\Ui\Component\MassAction\Filter'.
We had some memory issues in the past caused by some actions we performed on products in the adminhtml, and applying https://github.com/magento/magento2/commit/ca93b75416e68d59316144825b5870f22dc30f1e fixed the memory issues for us.
We run a Magento CE 2.1.7 shop with 98K products using a memory_limit of 256M with zero memory issues at this time. In my opinion 2GB or higher is completely ridiculous. But it probably depends on the features you are using of Magento...
@RishabhRkRai could you please provide a more precise description of what did you do on the Category page?
Did you manipulate with Products' position in the grid?
Also, could you please send the whole Error trace you found in the log.
Thanks in advance.
@maghamed The only thing I want to do is to change anything like change category block and want to save the product.
This is the only error I found in log for this
PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 23611506 bytes) in /../../../vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228" while reading response header from upstream, request: "POST /admin/catalog/category/save/key/4db0d3ed694826f50abc8f91df592c9668e4ca84a1ab9746027eabeee034234c/ HTTP/1.1", upstream: "fastcgi://unix:/var/php-nginx/149301285621347.sock/socket:", host: "...", referrer: ".../admin/catalog/category/edit/key/38f2246c79f697729734e4c3698df3b11ab5ad88de675602bb9805fc6254d56f/id/107/
@RishabhRkRai, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0, 2.2.0, 2.1.9
Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 1919907704 bytes) in C:\xampp\htdocs\magentob\vendor\magento\framework\ObjectManagerRelations\Runtime.php on line 38
I had a problem like this. I just changed memory_limit=16GB. That is it. Please restart the apache server again
Hello i'm facing the same issue as above noted, after installing magento2 on my window system with php 7.1.9, mysql 5.7.19 an error occurred :
Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 8021575524289698952 bytes) in D:\wamp64\www\magento2\vendor\magento\framework\ObjectManagerRelations\Runtime.php on line 38
i have also increased the memory_limit;
yes, finally i got the solution. i have changed the memory_limit from main php.ini into as memory_limit = 536870912 . now it's working.
For me worked increasing from 1024M to 3000M
add this in to nginx php section - fastcgi_param PHP_VALUE "memory_limit=768M \n max_execution_time=600";
and edit your limit, reload nginx and try.
Issue will short out with memory limit
Most helpful comment
Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 1919907704 bytes) in C:\xampp\htdocs\magentob\vendor\magento\framework\ObjectManagerRelations\Runtime.php on line 38