为什么作曲家在 300 秒后安装超时? [英] Why composer install timeouts after 300 seconds?

查看:27
本文介绍了为什么作曲家在 300 秒后安装超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在 symfony2 中制作的小项目,当我尝试在我的服务器上构建它时,解压缩 symfony 时总是失败.构建是好的,突然作曲家不会解压缩 symfony,我没有改变任何东西.我尝试使用 Jenkins 构建,也尝试从 bash 手动构建,结果相同.这不是权限问题,我的服务器上的互联网连接也正常.

I have small project made in symfony2 when I try to build it on my server it's always fails when unzipping symfony. Build was OK and suddenly composer won't unzip symfony and I didn't change anything. I tried to build with Jenkins and also manually from bash with same result. It's not permissions problem and also internet connection on my server is OK.

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
 - Installing symfony/symfony (v2.3.4)
 Downloading: 100%
[SymfonyComponentProcessExceptionProcessTimedOutException]
The process "unzip '/path/vendor/symfony/symfony/6116f6f3
d4125a757858954cb107e64b' -d 'vendor/composer/b2f33269' && chmod -R u+w 'vendor/composer/b2f33269'" exceeded the timeout of 300 seconds.

推荐答案

尝试 composer update/install -o -vvv 并检查是否正在从 composer 的缓存中加载包.

try composer update/install -o -vvv and check wether the package is being loaded from composer's cache.

如果是,请尝试清除 composer 的缓存或尝试添加 -cache-dir=/dev/null.

if yes try clearing composer's cache or try adding -cache-dir=/dev/null.

要强制下载存档而不是克隆源,请将 --prefer-dist 选项与 --no-dev 结合使用.

To force downloading an archive instead of cloning sources, use the --prefer-dist option in combination with --no-dev.

否则你可以尝试提高作曲家的进程超时值:

Otherwise you could try raising composer's process timeout value:

export COMPOSER_PROCESS_TIMEOUT=600   ( defaults to 300 )

这篇关于为什么作曲家在 300 秒后安装超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆