I'm running into an issue as I add products to our store where it will get a "failed to allocate memory error", and in the error it says it's used up all 756MB of memory trying to allocate an additional 2MB or something, but the server actually has 4GB of memory.
I have a developer I work with and he and I have both edited the php.ini file to increase the memory limit to 4GB, but nothing's changed. He says there doesn't appear to be an issue with Magento but rather the sever, but to me it looks like Magento's not recognizing what's available on the server. Is there anything I'm overlooking that could fix this quickly (I'm trying to add items to a configurable product but the screen never loads)?
Hello @camdenshawn_cam
Please check the .user.ini file in Magento root directory.
Also, please check if Magento cron job is working or not.
If it is working, please check [Magento_Root]/var/log/update.log.
Hope it helps.
Hello @camdenshawn_cam
There are few options to fix it
1.
If You are facing this issue from Add/Edit Product only than please check with Temando_Shipping module. May be there will be cause of taking more memory to execute Temando Shipping Attribute.
2.
if Not than You can check with your .htaccess or php.ini to increase memory
3. You can go to Server Cpanel and Edit PHP INI Manager option and check the memory limit.
If answer is useful??? please Accept as Solution & give Kudos
That's a setting in your php.ini. It can be in your global php.ini or in your .htaccess file. It's frequently overridden in your .htaccess file. Check there as well as your php.ini. And make sure to restart PHP-fpm once you have made the change.
As far as how to set up your server for production, you can make that change temporarily for what you're doing, but setting PHP to take 4GB on a server that only has 4GB of ram will lead to **bleep**ty performance because it will start to swap. Honestly, I wouldn't really recommend running Magento 2 on a machine with only 4GB of ram.