composer install でタイムアウトする場合の対処法
php composer.phar install
実行時に以下のようなエラーが出ることがあります。
[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process "git clone --no-checkout 'git://git.code.sf.net/p/tcpdf/code' '/home/vagrant/vendors/tecnick.com/tcpdf' && cd '
/home/vagrant/vendors/tecnick.com/tcpdf' && git remote add composer 'git://git.code.sf.net/p/tcpdf/code' && git fetch compo
ser" exceeded the timeout of 300 seconds.
Exception trace:
() at phar:///home/vagrant/vendor/symfony/process/Symfony/Component/Process/Process.php:1208
Symfony\Component\Process\Process->checkTimeout() at phar:///home/vagrant/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:358
composerでインストールしようとしたものがタイムアウトして落としきれなかったようですね。
その時の対処法を書きます。
タイムアウトを延ばす
単純にタイムアウト秒数を延ばす方法です。デフォルトは300秒なので、それを延ばして対処します。
export COMPOSER_PROCESS_TIMEOUT=2000
php composer.phar install