ErrorException: proc_open(): fork failed – Cannot allocate memory in phar

If you see the errors like that

ErrorException: proc_open(): fork failed – Cannot allocate memory in phar:///var/www/workspace/MyProject/build/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php on line 943

Call Stack:
0.0523 765208 1. {main}() /var/www/workspace/MyProject/build/composer/composer.phar:0
0.0528 763216 2. 

It means your server doesn't have enough memory for composer executes their commands.

You can solve it by upgrading your server or you can create swap memory for your server by using these commands

# /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
# /sbin/mkswap /var/swap.1
# /sbin/swapon /var/swap.1

 

Hope it is useful for you 🙂

Revisions

One Response to “ErrorException: proc_open(): fork failed – Cannot allocate memory in phar”

  1. Peter 16/06/2017 at 11:57 am #

    Good article

Leave a Reply