所以,我已经完成了堆栈和git bug线程,并且似乎找不到任何有用的东西。这是一个开发服务器,centos linux,运行php 7.2,大约12Gb的可用内存和交换。
作曲家需要或作曲家更新时内存不足。
我已将内存使用率设置为-1,并验证php的CLI版本设置为-1。
php -i | grep memory
memory_limit => -1 => -1
我已经运行:composer自我更新,它是最新版本。
我尝试过:php -d memory_limit=-1 composer require ...
并且,在每个实例中,只是尝试使用require,它仍然耗尽内存。有没有某个作曲家覆盖我在php.ini或运行时设置中设置的限制。它似乎最大约200Mb。
更新
php -v
ea-php-cli Copyright 2017 cPanel, Inc.
PHP 7.0.28 (cli) (built: Mar 6 2018 09:28:15) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
作曲家的输出-vvv requre:
$ composer -vvv require willdurand/jsonp-callback-validator
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem: valid
Executing command (/home/XXXXXXXX/gateway): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /home/XXXXXXXX/.config/composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /home/XXXXXXXX/gateway/vendor/composer/installed.json
Loading plugin PackageVersions\Installer
Running 1.6.3 (2018-01-31 16:28:17) with PHP 7.0.28 on Linux / 4.15.12-x86_64-linode105
Downloading https://packagist.org/packages.json
Writing /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/packages.json into cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2013.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2014.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2015.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2016.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017-04.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017-07.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017-10.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2018-01.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-archived.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-latest.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/provider-willdurand$jsonp-callback-validator.json from cache
Using version ^1.1 for willdurand/jsonp-callback-validator
./composer.json has been updated
Reading ./composer.json
Loading config file ./composer.json
Executing command (/home/XXXXXXXX/gateway): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /home/XXXXXXXX/.config/composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /home/XXXXXXXX/gateway/vendor/composer/installed.json
Loading plugin PackageVersions\Installer_composer_tmp0
Reading ./composer.lock
Loading composer repositories with package information
Downloading https://packagist.org/packages.json
Writing /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2013.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2014.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2015.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2016.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017-04.json from cache
Reading /home/XXXXXXXX/.cache/composer/repo/https---packagist.org/p-provider-2017-07.json from cache
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
Fatal error: Out of memory (allocated 196608000) (tried to allocate 20480 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/Repository/ComposerRepository.php on line 574
mmap() failed: [12] Cannot allocate memory
Fatal error: Out of memory (allocated 196608000) (tried to allocate 20480 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/Console/Application.php on line 78