12

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

Community
  • 1
  • 1
Sruj
  • 1,177
  • 2
  • 18
  • 38
  • Composer isn't exceeding the timeout, it's actually `php app/console assets:install web` that's failing. – sjagr Jan 27 '15 at 18:08
  • i have nowhere number `300` in php.ini (both php and apache directories) – Sruj Jan 27 '15 at 18:11
  • Symfony sets its own default timeout. You can define your own with `--timeout` in your `app/console` commands. Either way something is funky with your assets. Clear your caches and ensure that the `web` folder is writable. – sjagr Jan 27 '15 at 18:12
  • is this notation correct? `composer create-project -s dev sylius/sylius --timeout 6000` – Sruj Jan 27 '15 at 18:19
  • No, your `app/console` commands. I'm telling you that `php app/console` is failing to install assets. Nothing to do with composer! – sjagr Jan 27 '15 at 18:21
  • so how to do this as i have empty directory and run `composer create-project -s dev sylius/sylius` on that empty directory. And this timeout error is result of that command. – Sruj Jan 27 '15 at 18:28
  • Did you clear out your Symfony caches? `rm -rf app/cache/*` – sjagr Jan 27 '15 at 18:29
  • @sjagr I can't clear Symfony caches cause I'm creating new project with new Symfony. Now, after clearing Composer cache same error occur. – Sruj Jan 27 '15 at 20:17

2 Answers2

32

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/

DiegoYungh
  • 371
  • 4
  • 5
15

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
  }
}
X zheng
  • 1,731
  • 1
  • 17
  • 25