F
F
ff0xff2018-12-11 17:58:57
PHP
ff0xff, 2018-12-11 17:58:57

Increase maximum memory for composer?

Composer version 1.8.0
How to increase the amount of allowed memory for consumption.
Crashes into a fatal error during installation.
Tried:
export COMPOSER_MEMORY_LIMIT=-1
in php.ini set memory_limit
php -d memory_limit=512M /usr/local/bin/composer install
Still throws an error:

composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 638590976) (tried to allocate 67108872 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 84
Fatal error: Out of memory ( allocated 638590976) (tried to allocate 67108872 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 84

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2018-12-11
@ff0xff

Your problem is not in the limits, but in the lack of memory as such. You can get around the problem by connecting swap, for example, in the form of a file.

O
Oleg, 2018-12-11
@402d

$ php --ini
check that you have edited the correct ini file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question