Report this

What is the reason for this report?

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777224 bytes)

Posted on May 29, 2018

On a Serverpilot Ubuntu apache/nginx install I am trying to install a WP-CLI package called MU-Migration (https://10up.com/blog/2016/streamline-multisite-migration/#comment-813957) from a ssh terminal window but despite having memory_limit = 512M in my apps user.ini I get Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 16777224 bytes).



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Seems like the php-cli is not picking up the correct php.ini and is still having 256M as its memory limit. What you could do is run:

php -i | grep php.ini

And you would get the correct php.ini file that you should edit.

Regards, Bobby

Heya,

After modifying user.ini or php.ini, you may need to restart PHP-FPM or the web server for the changes to take effect:

sudo service phpX.Y-fpm restart
# For Apache:
sudo service apache2 restart
# For Nginx:
sudo service nginx restart

Note: Replace X.Y with your PHP version.

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.