PapayaSoft - Phuket web development

Composer Process Timeout When Fetching Large Repositories

| Comments

Yesterday I was doing a composer install from within my VM, but it kept timing out.

My first assumption was some network problem since my internet service is relatively slow and unreliable (at least compared to more developed places), especially from within my VM. But numerous tests suggested that my internet connectivity was ok.

Invoking Composer with the -vv verbose option showed me that it was failing while attemtping to clone the symfony/filesystem repo from GitHub. Cloning this repo directly, outside of the context of a composer install/update, succeeded. But it was a large repo and took a while.

All this suggested that Composer itself was imposing a limit on how long it would allow for the remote git operation. A look at the Composer documentation confirmed that the environment variable COMPOSER_PROCESS_TIMEOUT governs this. The variable is set to a default value of 300 (seconds) which was apparently not enough for a large clone operation using my slow internet connection. Raising this value using:

1
COMPOSER_PROCESS_TIMEOUT=2000 php composer.phar install

got me over the hump.

Many thanks for NileWebSites for their post that made me aware of this.

Comments