DEV Community

TRUNG VU
TRUNG VU

Posted on

How to handle out of memory errors when running composer

Alt Text

Just set the memory_limit specifying the full route of your composer.phar file and update if you got the out of memory error when running composer require.

php -d memory_limit=-1 [composer_phar_file_path] update
Enter fullscreen mode Exit fullscreen mode

I hope it can help you :)

Discussion (1)

Collapse
sivabalan02 profile image
Sivabalan

setting memory_limit to -1 is not good pratice