Home » Php » php – composer exceeded the timeout of 300 seconds while installing Sylius on composer GitBash

php – composer exceeded the timeout of 300 seconds while installing Sylius on composer GitBash

Posted by: admin July 12, 2020 Leave a comment

Questions:

I trying to install Sylius composer create-project -s dev sylius/sylius via Git bash in Windows (WAMP) and got this

[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

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

i did this $cfg['ExecTimeLimit'] = 0; like here https://stackoverflow.com/a/17466797/3190476

How to&Answers:

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 --global config process-timeout 2000

I found the solution here: http://www.papayasoft.com/2013/08/22/composer-process-timeout-when-fetching-large-repositories/

Answer:

Add config option in composer.json file
It is best solution for your projects
only add process-timeout key and value to 0

{....
"config": {
    "process-timeout":0
  }
}