bash 在 composer GitBash 上安装 Sylius 时,composer 超过了 300 秒的超时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28177019/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
composer exceeded the timeout of 300 seconds while installing Sylius on composer GitBash
提问by Sruj
I trying to install Sylius composer create-project -s dev sylius/sylius
via Git bash in Windows (WAMP) and got this
我试图composer create-project -s dev sylius/sylius
通过 Windows (WAMP) 中的 Git bash安装 Sylius并得到了这个
[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process ""c:\wamp\bin\php\php5.5.12\php.exe" "app/console" assets:insta
ll "web"" exceeded the timeout of 300 seconds.
i changed phi.ini
我改变了phi.ini
realpath_cache_size = 16k
realpath_cache_ttl = 120
memory_limit = 512M //by?o 128M
max_input_time = 600 //60
max_execution_time = 120
i did export COMPOSER_PROCESS_TIMEOUT=6000 ( defaults to 300 )
in MINGW32 (bash in windows) to change composer timeout like here https://stackoverflow.com/a/18917919/3190476
我export COMPOSER_PROCESS_TIMEOUT=6000 ( defaults to 300 )
在 MINGW32(Windows 中的 bash)中更改了作曲家超时,如这里https://stackoverflow.com/a/18917919/3190476
i did this $cfg['ExecTimeLimit'] = 0;
like here https://stackoverflow.com/a/17466797/3190476
我在$cfg['ExecTimeLimit'] = 0;
这里做了这个https://stackoverflow.com/a/17466797/3190476
回答by DiegoYungh
for one time solution
一次性解决方案
COMPOSER_PROCESS_TIMEOUT=2000 php composer.phar install
Or add to composer registry if you use it globally as I do
或者,如果您像我一样在全球范围内使用它,则将其添加到 Composer 注册表中
composer --global config process-timeout 2000
I found the solution here: http://www.papayasoft.com/2013/08/22/composer-process-timeout-when-fetching-large-repositories/
我在这里找到了解决方案:http: //www.papayasoft.com/2013/08/22/composer-process-timeout-when-fetching-large-repositories/
回答by riguang zheng
Add config option in composer.json file It is best solution for your projects only add process-timeout key and value to 0
在 composer.json 文件中添加配置选项对于您的项目来说最好的解决方案是将进程超时键和值添加到 0
{....
"config": {
"process-timeout":0
}
}