Fatal error: Out of memory when executing composer require cboden/ratchet on symfony project
Fatal error: Out of memory when executing composer require cboden/ratchet on symfony project
安装 Ratchet 软件包时,我最终遇到了我们的内存错误。
当安装了很多包时,这显然会成为一个问题,但是我的项目中只安装了几个库(比如 jquery、bootstrap 和 jqueryui).
我也不明白之前的消息(VirtualFree(): Attempt to access invalid address. and others from this kind)。
我对 composer 有点陌生,对 symfony 有基本的了解,所以我不明白可能是什么问题。
这是我的错误(这是第一次尝试安装,项目版本是Symfony 3.4.14 (kernel: app, env: dev, debug: true)
):
Using version ^0.4.1 for cboden/ratchet
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.
VirtualFree() failed: [0x000001e7] Attempt to access invalid address.
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 975175680) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
Fatal error: Out of memory (allocated 975175680) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
这是一个很常见的问题,不一定与 Ratchet 包有关。虽然这可能不是正确的解决方案,但我解决这个问题的方法是简单地删除 PHP 内存限制。
您首先需要找到您的 php.ini 文件,其位置因您的设置而异,然后编辑以下行:
memory_limit = 128M
并将其更改为 memory_limit = -1
.
有任何问题请告诉我。
安装 Ratchet 软件包时,我最终遇到了我们的内存错误。
当安装了很多包时,这显然会成为一个问题,但是我的项目中只安装了几个库(比如 jquery、bootstrap 和 jqueryui).
我也不明白之前的消息(VirtualFree(): Attempt to access invalid address. and others from this kind)。
我对 composer 有点陌生,对 symfony 有基本的了解,所以我不明白可能是什么问题。
这是我的错误(这是第一次尝试安装,项目版本是Symfony 3.4.14 (kernel: app, env: dev, debug: true)
):
Using version ^0.4.1 for cboden/ratchet
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.
VirtualFree() failed: [0x000001e7] Attempt to access invalid address.
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 975175680) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
Fatal error: Out of memory (allocated 975175680) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
这是一个很常见的问题,不一定与 Ratchet 包有关。虽然这可能不是正确的解决方案,但我解决这个问题的方法是简单地删除 PHP 内存限制。
您首先需要找到您的 php.ini 文件,其位置因您的设置而异,然后编辑以下行:
memory_limit = 128M
并将其更改为 memory_limit = -1
.
有任何问题请告诉我。