manjoo
manjoo

Reputation: 121

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command

I have been facing this error quite a long time, My production environment is running Apache 2.4 and php7 on a windows 2008 R2 enterprise platform.

My error log is full of these lines VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command. VirtualFree() failed: [0x000001e7] Attempt to access invalid address

After some time it leads to a 500 error, and later I have to restart the server it works fine only for some time.

Please help me in resolving these issues I have tried to update the memory from php and wordpress end but still no help

Upvotes: 11

Views: 22661

Answers (6)

Montaser El-sawy
Montaser El-sawy

Reputation: 830

Try this

composer install  --ignore-platform-reqs

Upvotes: 0

Kumanan
Kumanan

Reputation: 441

Updating php.ini file working for me. If you are using a Windows machine, you can try to increase the Memory Limit to 2 Gigabytes, as Laravel suggests, in your php.ini. On XAMPP it is located at C:\xampp\php\php.ini

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 2G

Restart the XAMPP server and run the composer update again.

Before: enter image description here

After: enter image description here

Upvotes: 0

Balaji
Balaji

Reputation: 10977

Just Update latest version of composer

https://getcomposer.org/download/

otherwise do below steps

This setting only in Local machine(commands)

To Check PHP Memory

php -r "echo ini_get('memory_limit');"

output:

128M

To Know PHP path

php --ini

output:

Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\xampp72\php\php.ini
Scan for additional .ini files in: (none)    
Additional .ini files parsed:      (none)

Just Update your memory limit

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit=512M

For Unlimit memory Access

memory_limit=-1

or simply run for windows

php -d memory_limit=-1 "C:\ProgramData\ComposerSetup\bin\composer.phar" update

Note: I recommend must download latest composer version

composer -v

Upvotes: 0

Abid_niazi_15
Abid_niazi_15

Reputation: 865

I was facing the same error and this command fixed issue for me on localhost

php -d memory_limit=-1 "C:/ProgramData/ComposerSetup/bin/composer.phar"

then do composer update

Upvotes: 0

harbrinder_singh
harbrinder_singh

Reputation: 462

I was getting this error if I do

composer update

It worked for me when I tried

composer install

Upvotes: 0

Jacob Cruz
Jacob Cruz

Reputation: 445

Your project may not be setup on the appropriate architecture.

Is your PHP 32 bit? Check the PHP_INT_SIZE constant to find out.

print_r(PHP_INT_SIZE); # 4 == 32bit // 8 == 64bit

Windows Server 2008 R2 is an x64 operating system, so an x86 version of Apache +/- x86 PHP could be capping the memory you may have installed on your machine and are trying to allocate. You won't be able to allocate more than 2G on on x86 version.

Upvotes: 2

Related Questions