I want to update composer for laravel projects,I have 2 projects and updated worked on first But get this Error on other:
>php -d memory_limit=-1 C:/composer/composer.phar update --verbose --profile
[5.6MB/0.01s] Loading composer repositories with package information
[5.8MB/1.17s] Updating dependencies (including require-dev)
[581.3MB/35.03s] Dependency resolution completed in 0.006 seconds
VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.
VirtualFree() failed: [0x000001e7] Attempt to access invalid address.
PHP Fatal error: Out of memory (allocated 1631584256) (tried to allocate 12288 bytes) in
phar://C:/composer/composer.phar/src/Composer/Package/Loader/ArrayLoader.php on line 56
Fatal error: Out of memory (allocated 1631584256) (tried to allocate 12288 bytes) in
phar://C:/composer/composer.phar/src/Composer/Package/Loader/ArrayLoader.php on line 56
I Tried many solution like change memory_limit or delete vendor file But don't work for me.How I can solved this?
When resolving a lot of dependencies composer can take up quite large amounts of memory. In order to allow it such amounts of memory the following steps can be taken:
memory_limit
value in php.iniphp -d memory_limit=-1
memory
key in the homestead.yaml file.I would recommend anywhere between 2G
and 4G
memory for composer to function properly. If the issue still persists something else might be causing memory leaks.
You've nailed step 2 already, but I've included it anyway for other people to get the complete picture.
User contributions licensed under CC BY-SA 3.0