Try this troubleshooting article: https://getcomposer.org/doc/articles/troubleshooting.md
Dec 6, 2020
9
Level 9
Composer won't run update: memory exhausted
Hello!
Composer is failing every time I run "composer update", regardless if I use --no-dev or not. This also means it also fails when I install new packages with "composer require [package]".
This is happening on my local machine and now I am afraid of updating the live server and create issues there.
Here is one output:
composer update --no-dev
1/5: http://repo.packagist.org/p/provider-201312fd0231b323cf89aac8a4b571485468fad4974d6f1b438c1199119c894a51.json
2/5: http://repo.packagist.org/p/provider-2014$b3109a33253fa386440f4695e7b315f9ff6652058ff082760efc31e1d9f6b312.json
3/5: http://repo.packagist.org/p/provider-2020-1007660de1dcf6594845d0aaf5dcbe51a62022878360a094bc52814584d0972b.json
4/5: http://repo.packagist.org/p/provider-latest6a0484cb6fbb4de15978e2f5d2fa1ef60e82dc6b0e6c7840b25f1d2545ecdf.json
5/5: http://repo.packagist.org/p/provider-2018$e200f2c6a6178d2cc80f34b8a6fcc4ff4249e1e172a4a46e111b25f45035c990.json
Finished: success: 5, skipped: 0, failure: 0, total: 5
Loading composer repositories with package information
Updating dependencies
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
Any ideas on what is going on?
If I set memory_limit to -1, the update ends with "killed".
Thanks!
Level 104
If you have not already, upgrade composer to v2 - many of these out-of-memory issues are immediately resolved.
1 like
Please or to participate in this conversation.