Answer the question
In order to leave comments, you need to log in
After composer update error mmap() failed: [12] Cannot allocate memory, what could be the reason?
PHP version - 7.2
OS - Debian 9
Virtual server physical memory: 1024 Mb
I have a small project with a few dependencies, when I try to do it composer update
I get the following error:
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 705966080) (tried to allocate 67108872 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 888418304) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
Answer the question
In order to leave comments, you need to log in
This may not be the only thing, I had a similar situation with installing predis through composer, as a result it turned out that not only the composer, but in principle the entire web server was short of memory.
And the solution is elementary, if you use vagrant, for example, just go to VirtualBox and increase the allocated RAM, if it is hosting, you will have to change the tariff.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question