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

拟墨画扇 提交于 2021-02-06 11:05:13

问题


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


回答1:


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.




回答2:


I was getting this error if I do

composer update

It worked for me when I tried

composer install



回答3:


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



来源:https://stackoverflow.com/questions/44491893/virtualalloc-failed-0x00000008-not-enough-storage-is-available-to-process-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!