Fix “Fatal error: Allowed memory size of X bytes exhausted (tried to allocate X bytes)” with composer update

Eneko
enekochan
Published in
1 min readDec 16, 2013

I got this error today when running composer update for one of my Symfony2 projects:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 3781182 bytes) in phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php on line 202

Composers troubleshooting tells that you can increase the memory PHP can allocate editing memory_limit parameter in php.ini. I changed it from 128M to 512M but still didn't work.

Finally the solution was to run composer update with no memory limit like this:

php -d memory_limit=-1 /usr/local/bin/composer update

--

--