Reputation: 161
I am trying to update the lock file using this command sudo php composer.phar update --lock
but I get the following error
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
even if I modified the value of memory_limit to 512M need help
Upvotes: 1
Views: 4571
Reputation: 119
you can run first composer diagnose, and check what the problem if in any case all is ok. then run
composer.phar self-update
Upvotes: 0
Reputation: 51
I have fixed this in Windows with:
php -d memory_limit=-1 C:/ProgramData/ComposerSetup/bin/composer.phar update
Upvotes: 2
Reputation: 70893
Composer easily uses one gigabyte of memory or more when updating the dependencies, and your error message states an allowed memory limit of about 1 GB - reducing the limit to 512 MB won't really help, you have to increase it beyond 1GB.
Upvotes: 0