Windows composer update fatal error: Allowed memory size of 1610612736 bytes exhausted


My composer despite unlimited storage has the following error message:

 composer update
 Loading composer repositories with package information
 Updating dependencies (including require-dev)

 VirtualAlloc() failed: [0x00000008] Zur Verarbeitung dieses Befehls sind nicht gen
 VirtualAlloc() failed: [0x00000008] Zur Verarbeitung dieses Befehls sind nicht gen

 Fatal error: Out of memory (allocated 1260388352) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 83

If you can no longer perform a composer update under Windows, Although it has the memory limit to unlimited, then you have a problem:

The Windows Xammp is only as 32 bit system available and RAM can provide only 2 GB at the moment, a further increase is not possible.

The solution is to run composer with a 64-bit PHP on the console (This then has up to 4 GB memory).

  • Download PHP x 64 version
  • unzip it and creating a php.ini (the umbennnen php.ini-development)
  • increase memory limit in php.ini: memory_limit =. -1
  • run on the console:
"C:\php-7.2.12-nts-Win32-VC15-x64\php" C:\ProgramData\ComposerSetup\bin\composer.phar update

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>