After composer update Laravel project, getting VirtualAlloc() failed: [0x00000008] Not enough memory error

-3

I am working on a laravel project and after taking clone of files from Github.

When Running Composer update command bellow error is coming

VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.

VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.

PHP Fatal error: Out of memory (allocated 868220928) (tried to allocate 58720256 bytes) in phar://C:/composer/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 90

Fatal error: Out of memory (allocated 868220928) (tried to allocate 58720256 bytes) in phar://C:/composer/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 90

laravel
github
composer-php
asked on Stack Overflow Sep 4, 2020 by Sandeep Yadav

1 Answer

0

you should set your memory_limit = -1 in your php config php.ini, but do not forget in production to let the default memory_limit and only do a composer install --no-dev.

This way, composer will do the install of your vendors based on composer.lock file.

You should also do the composer install --no-dev on your local machine to make sure that you have no developpement dependencies not compatible with the production environnement.

answered on Stack Overflow Sep 4, 2020 by Joey Peau

User contributions licensed under CC BY-SA 3.0