title: Composer install hangs at ScriptHandler::buildBootstrap
body: <p>Sometimes, <strong>not every time</strong>, but with increasing tendency, i discover the following behaviour with composer install on a symfony project.
  We are working with different branches here and after switching from a feature branch back to the master, a composer install is necessary.
  Everything works fine, but at the last step, the script terminates after 300 sec while "buildBootstrap".</p>
  
  <pre><code>&gt; post-update-cmd: Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
  Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception
  
  
  
    [Symfony\Component\Process\Exception\ProcessTimedOutException]                                                                                                                               
    The process "'/usr/bin/php5' '--php-ini=/etc/php5/cli/php.ini' '/var/www/Project/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/../Resources/bin/build_bootstrap  
    .php' 'app' 'app' " exceeded the timeout of 300 seconds.                                                                                                                                     
  
  
  
  Exception trace:
   () at phar:///var/www/Project/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:1219
   Symfony\Component\Process\Process-&gt;checkTimeout() at phar:///var/www/Project/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:356
   Symfony\Component\Process\Process-&gt;wait() at phar:///var/www/Project/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:210
   Symfony\Component\Process\Process-&gt;run() at /var/www/Project/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:454
   Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeBuildBootstrap() at /var/www/Project/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php:82
   Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap() at phar:///var/www/Project/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:211
   Composer\EventDispatcher\EventDispatcher-&gt;executeEventPhpScript() at phar:///var/www/Project/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:167
   Composer\EventDispatcher\EventDispatcher-&gt;doDispatch() at phar:///var/www/Project/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:92
   Composer\EventDispatcher\EventDispatcher-&gt;dispatchScript() at phar:///var/www/Project/composer.phar/src/Composer/Installer.php:346
   Composer\Installer-&gt;run() at phar:///var/www/Project/composer.phar/src/Composer/Command/UpdateCommand.php:143
   Composer\Command\UpdateCommand-&gt;execute() at phar:///var/www/Project/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
   Symfony\Component\Console\Command\Command-&gt;run() at phar:///var/www/Project/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
   Symfony\Component\Console\Application-&gt;doRunCommand() at phar:///var/www/Project/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
   Symfony\Component\Console\Application-&gt;doRun() at phar:///var/www/Project/composer.phar/src/Composer/Console/Application.php:147
   Composer\Console\Application-&gt;doRun() at phar:///var/www/Project/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
   Symfony\Component\Console\Application-&gt;run() at phar:///var/www/Project/composer.phar/src/Composer/Console/Application.php:82
   Composer\Console\Application-&gt;run() at phar:///var/www/Project/composer.phar/bin/composer:43
   require() at /var/www/Project/composer.phar:25
  
  
  update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]
  </code></pre>
  
  <p>After this error occured once, it is not possible any more to execute composer without hanging directly at the beginning.</p>
  
  <pre><code>$&gt; php -d memory_limit=-1 composer.phar -vvv install 
  </code></pre>
  
  <p>this will hang directly after pressing enter, no output, nothing. I reboot then the machine and <em>maybe</em> the next time is working, and sometimes not like described above.</p>
  
  <p>Has anyone discovered the same thing?</p>