undefined
undefined

Reputation: 161

fatal error allowed memory size composer

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

Answers (4)

Zakaria Charik
Zakaria Charik

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

Oriol Roselló
Oriol Roselló

Reputation: 51

I have fixed this in Windows with:

php -d memory_limit=-1 C:/ProgramData/ComposerSetup/bin/composer.phar update

Upvotes: 2

Fabien Thetis
Fabien Thetis

Reputation: 1734

php -d memory_limit=-1 composer.phar install

Upvotes: 0

Sven
Sven

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

Related Questions