Answer the question
In order to leave comments, you need to log in
Why is composer eating RAM?
I ordered a VPS (512 mb of RAM), I decided to install laravel, it seems to work. I decided to add a package, it displays the error "lack of memory or lack of a paging file." I looked, everything is fine with swapping, I increased the memory_limit in php_ini to 256 mb, the error is the same. Today I reinstalled the system and decided to install laravel, but here is the same error:
The following exception is caused by a lack of memory or swap, or not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
PHP Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 952
Warning: proc_open(): fork failed - Cannot allocate memory in phar:///usr/local/bin/composer/vendor/symfony/console/Application.php on line 952
[ErrorException]
proc_open(): fork failed - Cannot allocate memory
Answer the question
In order to leave comments, you need to log in
Composer's issue with memory consumption when updating with a lot of dependencies is quite well known, just look at their issue tracker ( 1 , 2 and many others).
Jordi Boggiano , one of the Composer authors says (for example here ) that the problem will be fundamentally solved in the second version, which is currently in development.
Aside note: usually, commands that modify the list of packages (and require a lot of memory for this) should only be run during development (i.e., for example, on your local machine), you need to use to deploy the project composer install
, and it does not require a lot of memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question