composer / composer

Dependency Manager for PHP
https://getcomposer.org/
MIT License
28.67k stars 4.56k forks source link

composer is very slow. #3156

Closed choiks141 closed 8 years ago

choiks141 commented 10 years ago

what happend???

jakoch commented 10 years ago

Thank you for reporting this. Could you provide some more details? Maybe your composer.json? Which dependencies cause this?

Also: please feel invited to contribute and make composer faster.

flip111 commented 10 years ago

I'm not sure if composer is slow because a lot of IO or a lot of CPU. In case of CPU then maybe it can use multiple cores??

francoispluchino commented 10 years ago

It is also caused by the getting of all the versions of each package, and any dependencies of each package version.

IMO, I think it would be really interesting to implement a lazy loading system, and retrieve only the name and version of the package, and only if the package meets all the conditions, retrieve the complete contents of the package (includes dependencies).

flip111 commented 10 years ago

ALL VERSIONS ?? like every git commit possible? or every git tag? If the main bottleneck is web connections then perhaps asynchronous requests are possible to speed up things.

francoispluchino commented 10 years ago

No, only the last commit of each branch, but all branches and all tags containing a composer.json file.

For VCS Repository, Composer retrieves each time all package versions one by one. For Packagist.org, All versions are retrieved once.

Of course, there is a local cache system, for avoid downloading the package files each time.

So if you have a lot of packages, and a lot of VCS repositories, your Composer may be very slow. In this case, install a Satis server.

tzoro commented 10 years ago
"require": {
        "php": ">=5.4",
        "laravel/framework": "4.2.*"
    }

For last few hours i could not managed to wait for install/update process to finish.. vagrant vbox on i5 cpu, fast network..

robhunt3r commented 10 years ago

I am getting slow fetchs too... For example, for symfony/symfony on a clean install, trying to get ~2.5 branch, it says timeout error (I know how to increase it) the point is, that composer takes more than 300 seconds to clone... But if I do manually I get the .zip or git clone in less than 5 seconds...

I'm running a Vagrant vbox on a i7 4770k CPU, 16GB ram and 100mbps bandwidth so I don't think the problem resides in my hardware...

The same problem occurs when using my Mavericks install without an virtualization software or my Debian laptop...

Months ago, composer was fast as light, but now it is impossible to work with... Neither composer update or composer install are fast, they can take more than 15 minutes to get few packages, even a clean standard symfony 2.5 installation.

I've tried using HHVM and a lot of options but I got same problem, composer is very slow... What's going on?

jakoch commented 10 years ago

Hmm. Which part is it? The solver or the downloads? Please provide some profiling data. php composer.phar install --prefer-dist --verbose -vvv --profile --no-interaction > composer.log

To reduce workload on the solver, you could be more specific on version constraints. So instead of using a version range "laravel/framework": "4.2.*" you could use one specific version "laravel/framework": "4.2.21".

As far as downloads are concerned: i'm working on parallel downloader for dist downloading. It's ready, but i need to split the big downloader class into drivers using a base class. There is quite a speed improvement, due to connection reusage and other advanced stuff (aria2). This won't help, if you "prefer-source", e.g. need to "git clone".

flip111 commented 10 years ago

:+1: for parallel downloader

robhunt3r commented 10 years ago

@jakoch Here's the output of a clean Symfony 2.5 install. Timeout and crash, git gets stuck so composer can't delete files because are being used. I need to kill GIT in order to delete temp files... But besides that, composer has ran for more than 10 minutes on a CLEAN INSTALL, that's insane...

This test was done on a Vagrant box, with a good DSL connection (1,4mbps download) if I download the same stuff using only git it doesn't take more than 1 minute to clone everything...

Composer was faster months ago, really more faster.

[4.1MB/0.03s] Reading ./composer.json
[4.2MB/0.04s] Loading config file ./composer.json
[4.7MB/0.04s] Executing command (CWD): git describe --exact-match --tags
[5.0MB/0.22s] Executing command (CWD): git branch --no-color --no-abbrev -v
[7.8MB/0.50s] Loading composer repositories with package information
[8.1MB/0.54s] Downloading https://packagist.org/packages.json
[8.1MB/1.32s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/packages.json into cache
[8.2MB/1.32s] Installing dependencies (including require-dev)
[8.6MB/1.34s] Downloading https://packagist.org/p/provider-active$b44b9caa72d61b7d9a8177e5390433e6a277406a5ee71f6ab893db479c048907.json
[12.9MB/2.35s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-active.json into cache
[13.1MB/2.37s] Downloading https://packagist.org/p/provider-archived$2902731a0d7482c38d2452783c2181817d3549167f7ca7918d8093d2e8f3daf9.json
[23.6MB/3.89s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-archived.json into cache
[23.1MB/3.93s] Downloading https://packagist.org/p/provider-latest$595051894f919b76ef3290826cac6a32c8f67147240f288bf859e7f6e2c3cd6a.json
[28.5MB/5.17s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
[26.7MB/5.21s] Downloading https://packagist.org/p/provider-stale$f779155860496d30098483dc4ff901a750fd93783eb467bf4124ebe2a2d857ca.json
[33.0MB/6.42s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/p-provider-stale.json into cache
[31.1MB/6.47s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$symfony.json from cache
[37.0MB/7.55s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$orm.json from cache
[37.4MB/7.62s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$doctrine-bundle.json from cache
[37.4MB/7.63s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-twig$extensions.json from cache
[37.5MB/7.63s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$assetic-bundle.json from cache
[37.7MB/7.66s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$swiftmailer-bundle.json from cache
[39.0MB/7.93s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$monolog-bundle.json from cache
[39.3MB/7.99s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-sensio$distribution-bundle.json from cache
[39.7MB/8.04s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-sensio$framework-extra-bundle.json from cache
[40.0MB/8.07s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-incenteev$composer-parameter-handler.json from cache
[40.1MB/8.08s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$framework-standard-edition.json from cache
[42.5MB/8.29s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$common.json from cache
[42.7MB/8.31s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-psr$log.json from cache
[42.7MB/8.31s] Downloading http://packagist.org/p/twig/twig$786def45a33f7ec282a4bea330e9bbbcb33e760e3a052fb62bc150f0cefdcf0f.json
[43.1MB/8.56s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/provider-twig$twig.json into cache
[43.0MB/8.60s] Downloading http://packagist.org/p/doctrine/dbal$63d3861f9726788085c8c73dc4c7130fe2c966b104022c73685aa8d1ed490134.json
[43.5MB/8.86s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$dbal.json into cache
[43.2MB/8.90s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$console.json from cache
[46.2MB/9.56s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$collections.json from cache
[46.3MB/9.58s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$framework-bundle.json from cache
[48.5MB/10.07s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$doctrine-bridge.json from cache
[50.1MB/10.38s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jdorn$sql-formatter.json from cache
[50.2MB/10.43s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-kriswallsmith$assetic.json from cache
[50.3MB/10.50s] Downloading http://packagist.org/p/symfony/yaml$d462c34260fe757dee3821567220f9b4d7279c023c0563ae6578b986e2819265.json
[59.3MB/11.02s] Writing /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$yaml.json into cache
[50.9MB/11.13s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-swiftmailer$swiftmailer.json from cache
[51.1MB/11.15s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$swiftmailer-bridge.json from cache
[53.9MB/11.32s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$monolog-bridge.json from cache
[54.8MB/11.52s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$dependency-injection.json from cache
[55.7MB/11.73s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$config.json from cache
[56.4MB/11.91s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$http-kernel.json from cache
[58.4MB/12.24s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-monolog$monolog.json from cache
[58.7MB/12.30s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$class-loader.json from cache
[59.5MB/12.49s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$form.json from cache
[60.8MB/12.75s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$http-foundation.json from cache
[61.5MB/12.93s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$filesystem.json from cache
[62.0MB/13.03s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$process.json from cache
[62.6MB/13.17s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$validator.json from cache
[63.9MB/13.43s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-sensiolabs$security-checker.json from cache
[64.1MB/13.53s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$inflector.json from cache
[64.1MB/13.54s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$cache.json from cache
[64.2MB/13.54s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$lexer.json from cache
[64.2MB/13.55s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-doctrine$annotations.json from cache
[64.5MB/13.74s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$routing.json from cache
[65.5MB/13.92s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$stopwatch.json from cache
[65.9MB/14.00s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$translation.json from cache
[66.8MB/14.19s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$event-dispatcher.json from cache
[67.6MB/14.38s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$templating.json from cache
[68.9MB/14.85s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$security-core.json from cache
[69.7MB/15.06s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$security-csrf.json from cache
[70.7MB/16.52s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$debug.json from cache
[71.3MB/16.91s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$options-resolver.json from cache
[71.8MB/17.09s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$property-access.json from cache
[72.3MB/17.22s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$locale.json from cache
[73.1MB/17.46s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$intl.json from cache
[72.9MB/18.75s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$icu.json from cache
[72.3MB/19.30s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-sensio$generator-bundle.json from cache
[72.7MB/19.38s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jms$security-extra-bundle.json from cache
[72.8MB/19.41s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jms$di-extra-bundle.json from cache
[73.0MB/19.50s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$security-bundle.json from cache
[74.1MB/19.85s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jms$metadata.json from cache
[74.1MB/19.86s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jms$aop-bundle.json from cache
[74.2MB/19.91s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$finder.json from cache
[74.7MB/20.09s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$security.json from cache
[77.1MB/21.06s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jms$cg.json from cache
[77.2MB/23.98s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-jms$parser-lib.json from cache
[77.2MB/24.03s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-phpoption$phpoption.json from cache
[76.9MB/24.30s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$propel1-bridge.json from cache
[77.6MB/24.50s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$twig-bridge.json from cache
[79.2MB/24.77s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$twig-bundle.json from cache
[80.2MB/24.93s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$web-profiler-bundle.json from cache
[81.3MB/25.18s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$browser-kit.json from cache
[82.3MB/25.36s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$css-selector.json from cache
[82.9MB/25.48s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$dom-crawler.json from cache
[87.6MB/25.72s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$serializer.json from cache
[88.2MB/25.90s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$proxy-manager-bridge.json from cache
[88.6MB/25.99s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$security-acl.json from cache
[88.9MB/26.10s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$security-http.json from cache
[89.3MB/26.17s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$expression-language.json from cache
[89.4MB/26.20s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$debug-bundle.json from cache
[89.4MB/26.20s] Reading /home/vagrant/.composer/cache/repo/https---packagist.org/provider-symfony$var-dumper.json from cache
[258.7MB/99.66s]   - Installing jdorn/sql-formatter (v1.2.17)
[258.8MB/99.69s] Reading /home/vagrant/.composer/cache/files/jdorn/sql-formatter/64990d96e0959dff8e059dfcdc1af130728d92bc.zip from cache
[258.8MB/99.73s]     Loading from cache
[258.8MB/99.73s]     Extracting archive
[258.8MB/99.79s] Executing command (CWD): unzip '/vagrant/www/vendor/jdorn/sql-formatter/139dc61a20a5a3ba52f33b65f996bcfc' -d 'vendor/composer/9a3b509b' && chmod -R u+w 'vendor/composer/9a3b509b'
[258.8MB/101.42s] 
[258.8MB/101.42s]     REASON: doctrine/doctrine-bundle v1.2.0 requires jdorn/sql-formatter ~1.1 -> satisfiable by jdorn/sql-formatter[v1.1.0, v1.2.0, v1.2.16, v1.2.17, v1.2.9].
[258.8MB/101.42s] 
[258.8MB/101.53s]   - Installing twig/twig (v1.16.1)
[258.8MB/101.55s] Reading /home/vagrant/.composer/cache/files/twig/twig/7c4c01dcf578523cfcddf383641a4f12790270ec.zip from cache
[258.8MB/101.66s]     Loading from cache
[258.8MB/101.66s]     Extracting archive
[258.8MB/101.69s] Executing command (CWD): unzip '/vagrant/www/vendor/twig/twig/c22970296e95b94af15578bd21d87422' -d 'vendor/composer/d78cb207' && chmod -R u+w 'vendor/composer/d78cb207'
[258.9MB/166.64s] 
[258.9MB/166.64s]     REASON: symfony/symfony 2.6.x-dev requires twig/twig ~1.12 -> satisfiable by twig/twig[v1.12.0, v1.12.1, v1.12.2, v1.12.3, v1.13.0, v1.13.1, v1.13.2, v1.14.0, v1.14.1, v1.14.2, v1.15.0, v1.15.1, v1.16.0, v1.16.1].
[258.9MB/166.64s] 
[258.9MB/166.74s]   - Installing psr/log (1.0.0)
[258.9MB/166.76s] Reading /home/vagrant/.composer/cache/files/psr/log/fe0936ee26643249e916849d48e3a51d5f5e278b.zip from cache
[258.9MB/166.79s]     Loading from cache
[258.9MB/166.79s]     Extracting archive
[258.9MB/166.82s] Executing command (CWD): unzip '/vagrant/www/vendor/psr/log/fbd1e07cc252bd980147aad5eb1dfba7' -d 'vendor/composer/aff2fc37' && chmod -R u+w 'vendor/composer/aff2fc37'
[258.9MB/168.12s] 
[258.9MB/168.12s]     REASON: symfony/symfony 2.6.x-dev requires psr/log ~1.0 -> satisfiable by psr/log[1.0.0].
[258.9MB/168.12s] 
[258.9MB/168.21s]   - Installing doctrine/lexer (v1.0)
[258.9MB/168.23s] Reading /home/vagrant/.composer/cache/files/doctrine/lexer/2f708a85bb3aab5d99dab8be435abd73e0b18acb.zip from cache
[258.9MB/168.26s]     Loading from cache
[258.9MB/168.26s]     Extracting archive
[258.9MB/168.29s] Executing command (CWD): unzip '/vagrant/www/vendor/doctrine/lexer/ea6950832e9a68fc8f1284ca90424494' -d 'vendor/composer/5df905e4' && chmod -R u+w 'vendor/composer/5df905e4'
[258.9MB/169.09s] 
[258.9MB/169.09s]     REASON: doctrine/common v2.4.2 requires doctrine/lexer 1.* -> satisfiable by doctrine/lexer[v1.0].
[258.9MB/169.09s] 
[258.9MB/169.16s]   - Installing doctrine/annotations (v1.2.1)
[258.9MB/169.18s] Reading /home/vagrant/.composer/cache/files/doctrine/annotations/6a6bec0670bb6e71a263b08bc1b98ea242928633.zip from cache
[258.9MB/169.24s]     Loading from cache
[258.9MB/169.24s]     Extracting archive
[258.9MB/169.27s] Executing command (CWD): unzip '/vagrant/www/vendor/doctrine/annotations/d5d4ba0105e754570eb7b22bf2ae0bcd' -d 'vendor/composer/5243b742' && chmod -R u+w 'vendor/composer/5243b742'
[259.0MB/181.08s] 
[258.9MB/181.08s]     REASON: doctrine/common v2.4.2 requires doctrine/annotations 1.* -> satisfiable by doctrine/annotations[v1.0, v1.1, v1.1.1, v1.1.2, v1.2.0, v1.2.1].
[258.9MB/181.08s] 
[258.9MB/181.17s]   - Installing doctrine/collections (v1.2)
[258.9MB/181.19s] Reading /home/vagrant/.composer/cache/files/doctrine/collections/b99c5c46c87126201899afe88ec490a25eedd6a2.zip from cache
[258.9MB/181.22s]     Loading from cache
[258.9MB/181.22s]     Extracting archive
[258.9MB/181.25s] Executing command (CWD): unzip '/vagrant/www/vendor/doctrine/collections/eeadc3e2745057b5b1be1c2211512a49' -d 'vendor/composer/0c9a5e84' && chmod -R u+w 'vendor/composer/0c9a5e84'
[259.0MB/184.27s] 
[258.9MB/184.27s]     REASON: doctrine/orm v2.4.6 requires doctrine/collections ~1.1 -> satisfiable by doctrine/collections[v1.1, v1.2].
[258.9MB/184.28s] 
[258.9MB/184.36s]   - Installing doctrine/cache (v1.3.1)
[258.9MB/184.38s] Reading /home/vagrant/.composer/cache/files/doctrine/cache/cf483685798a72c93bf4206e3dd6358ea07d64e7.zip from cache
[258.9MB/184.43s]     Loading from cache
[258.9MB/184.43s]     Extracting archive
[258.9MB/184.46s] Executing command (CWD): unzip '/vagrant/www/vendor/doctrine/cache/144408bc7cf7d28b468a35f0033f306b' -d 'vendor/composer/dedbe07a' && chmod -R u+w 'vendor/composer/dedbe07a'
[259.0MB/193.94s] 
[259.0MB/193.94s]     REASON: doctrine/common v2.4.2 requires doctrine/cache 1.* -> satisfiable by doctrine/cache[v1.0, v1.1, v1.2.0, v1.3.0, v1.3.1].
[259.0MB/193.94s] 
[259.0MB/194.05s]   - Installing doctrine/inflector (v1.0)
[259.0MB/194.07s] Reading /home/vagrant/.composer/cache/files/doctrine/inflector/54b8333d2a5682afdc690060c1cf384ba9f47f08.zip from cache
[259.0MB/194.10s]     Loading from cache
[259.0MB/194.10s]     Extracting archive
[259.0MB/194.14s] Executing command (CWD): unzip '/vagrant/www/vendor/doctrine/inflector/af2f33186a7a3ca982ce1da86a88436f' -d 'vendor/composer/67c3c44a' && chmod -R u+w 'vendor/composer/67c3c44a'
[259.0MB/195.69s] 
[259.0MB/195.69s]     REASON: doctrine/common v2.4.2 requires doctrine/inflector 1.* -> satisfiable by doctrine/inflector[v1.0].
[259.0MB/195.69s] 
[259.0MB/195.79s]   - Installing doctrine/common (v2.4.2)
[259.0MB/195.81s] Reading /home/vagrant/.composer/cache/files/doctrine/common/5db6ab40e4c531f14dad4ca96a394dfce5d4255b.zip from cache
[259.0MB/195.89s]     Loading from cache
[259.0MB/195.90s]     Extracting archive
[259.0MB/195.95s] Executing command (CWD): unzip '/vagrant/www/vendor/doctrine/common/9d3c672c120422b351e176cb18b0c875' -d 'vendor/composer/063cfb18' && chmod -R u+w 'vendor/composer/063cfb18'
[259.1MB/209.98s] 
[259.0MB/209.98s]     REASON: symfony/symfony 2.6.x-dev requires doctrine/common ~2.2 -> satisfiable by doctrine/common[2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, v2.4.0, v2.4.1, v2.4.2].
[259.0MB/209.98s] 
[259.0MB/210.08s]   - Installing symfony/symfony (dev-master 8e42756)
[259.0MB/210.10s] Downloading https://api.github.com/repos/symfony/symfony/zipball/8e42756c375ac73d4fc2a00a24a23281bb3be082
[259.0MB/210.10s]     Downloading: connection...[265.5MB/220.85s] [265.5MB/220.85s]     Downloading: 100%[265.5MB/220.85s]                            [265.5MB/220.85s] [265.5MB/220.85s] 
[259.0MB/225.87s] Writing /home/vagrant/.composer/cache/files/symfony/symfony/8e42756c375ac73d4fc2a00a24a23281bb3be082.zip into cache
[259.0MB/226.01s]     Extracting archive
[259.0MB/226.96s] Executing command (CWD): unzip '/vagrant/www/vendor/symfony/symfony/fbd93f4bd4f227f891afb994d8fd984b' -d 'vendor/composer/11d92029' && chmod -R u+w 'vendor/composer/11d92029'
[259.5MB/1052.81s] Failed to download symfony/symfony from dist: Could not delete /vagrant/www/vendor/symfony/symfony/fbd93f4bd4f227f891afb994d8fd984b: 
[259.5MB/1052.81s] Now trying to download from source
[259.5MB/1052.81s]   - Installing symfony/symfony (dev-master 8e42756)

  [RuntimeException]
  Could not delete /vagrant/www/vendor/symfony/symfony/fbd93f4bd4f227f891afb994d8fd984b:

Exception trace:
 () at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:193
 Composer\Util\Filesystem->unlink() at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:39
 Composer\Util\Filesystem->remove() at phar:///usr/bin/composer/src/Composer/Util/Filesystem.php:80
 Composer\Util\Filesystem->emptyDirectory() at phar:///usr/bin/composer/src/Composer/Downloader/VcsDownloader.php:58
 Composer\Downloader\VcsDownloader->download() at phar:///usr/bin/composer/src/Composer/Downloader/DownloadManager.php:201
 Composer\Downloader\DownloadManager->download() at phar:///usr/bin/composer/src/Composer/Installer/LibraryInstaller.php:156
 Composer\Installer\LibraryInstaller->installCode() at phar:///usr/bin/composer/src/Composer/Installer/LibraryInstaller.php:87
 Composer\Installer\LibraryInstaller->install() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:152
 Composer\Installer\InstallationManager->install() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:139
 Composer\Installer\InstallationManager->execute() at phar:///usr/bin/composer/src/Composer/Installer.php:548
 Composer\Installer->doInstall() at phar:///usr/bin/composer/src/Composer/Installer.php:217
 Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/InstallCommand.php:123
 Composer\Command\InstallCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:889
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:138
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:124
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:84
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:43
 require() at /usr/bin/composer:15

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
agounaris commented 10 years ago

The last few months I also experience very slow installs, super slow updates and high memory usage! I have 3 gb in my php.ini in order to make this work...

for example just now ... waits for at least 5 minutes on the line Reading /Users/local/.composer/cache/repo/https---packagist.org/provider-guzzle$plugin-error-response.json from cache

ptrofimov commented 10 years ago

composer is very slow

Totally. The further, the slower composer works.

robhunt3r commented 10 years ago

The slow speed and high mem usage is one of the most important problems of Composer, I need to make a Vagrant machine with 4GB RAM just to get Composer working... And installing just one dependency takes about 150 seconds...

Seldaek commented 10 years ago

Just merged a few patches that should improve things depending on your use cases. Either way it's a known issue and we do what we can to address this.

Please try again after running composer self-update. By the way @robhunt3r your failure above seems to have been due to a failure to delete the zip file after unzipping, which isn't due to composer memory usage or the network really. It's most likely due to you running in a shared directory within the VM that wasn't released yet by the host OS. Are you running a VM in windows by any chance?

robhunt3r commented 10 years ago

@Seldaek Nope, that was under Debian Wheezy, but that's old, I'm running on a new project under Mac OS X Mavericks (using a Vagrant machine too) but same problems, I will test tomorrow updating composer and give a feedback :)

tzoro commented 9 years ago

@Seldaek, same issues and environment here. Debian Vagrant machine on Mac

alcohol commented 9 years ago

There are a few tweaks that can speed up the downloading on Vagrant boxes.

These two lines for one: https://github.com/alcohol/sf-minimal-demo/blob/master/Vagrantfile#L15-L16

Also, if you're on a Mac, I highly recommend you use composer on the host (OSX), not inside the guest (the virtualbox machine) if you are using shared directories.

alcohol commented 9 years ago

I just tested and can confirm that running composer inside the guest with a shared directory setup is extremely slow (most likely due to the underlying implementation). If I symlink the vendor directory to a path that is not shared with the host (e.g. ln -sf /tmp/vendor vendor) then the install process takes about just as long as it does when running it on the host. Downside here being, the content of vendor/ is not accessible on the host.

I think we can conclude that composer is not the culprit here.

robhunt3r commented 9 years ago

I think is not a composer problem inside a Vagrant machine but some kind of problem in the configuration in the virtual machine itself.

I can confirm that composer is running fast on host machines since a week ago more or less, so that problem is fixed for now at least for me it went from ~900 sec to ~180 with the same weight of vendors inside my composer json, even with some post update scripts added it is fast, but can't say the same for my vagrant machine tho.

I will test to use my vagrant inside my main SSD in order to reduce the latency between disk writes and see if it's better there.

Enviado desde mi iPhone

El 10/12/2014, a las 18:18, Rob notifications@github.com escribió:

I just tested and can confirm that running composer inside the guest with a shared directory setup is extremely slow (most likely due to the underlying implementation). If I symlink the vendor directory to a path that is not shared with the host (e.g. ln -sf /tmp/vendor vendor) then the install process takes about just as long as it does when running it on the host. Downside here being, the content of vendor/ is not accessible on the host.

I think we can conclude that composer is not the culprit here.

— Reply to this email directly or view it on GitHub.

alcohol commented 9 years ago

I think is not a composer problem inside a Vagrant machine but some kind of problem in the configuration in the virtual machine itself.

That is pretty much along the lines of what I was saying as well. Executing composer inside a guest and installing into a vendor directory shared with the host through the use of the "synced folder" mechanism, you will suffer a significant performance impact.

If possible, use composer on the host instead, or symlink the vendor directory to a path not shared with the host (if you can live with the downside of not being able to access the content on the host then).

jakoch commented 9 years ago

You could try using a true shared folder via NFS, instead of the native shared folders. This will provide better performance. https://docs.vagrantup.com/v2/synced-folders/nfs.html

// Vagrantfile
config.vm.network "private_network", ip: "192.168.10.1"
config.vm.synced_folder ".", "/vagrant", type: "nfs"
rquadling commented 9 years ago

Whilst there are issues with speed, would providing a bit more realtime feedback give the user a little more assurance that 'something' is being done. The long delays with no output leads to the 'is it dead?' questions. Whereas a little additional logging (a count of steps to be done and reached maybe) could be helpful.

alcohol commented 9 years ago

More output? Sounds an awful lot like what -v[v[v]] is for?

robhunt3r commented 9 years ago

@RQuadling do composer update -vvv --profile and you will get what's going on in real time.

@alcohol Agree. I've been using composer on my host for a while, because it's faster and actually I only do stuff in my Vagrant when I need to do something concrete, but not for common tasks.

Seldaek commented 9 years ago

Not much more we can do in the near term so closing this.

leric commented 9 years ago

Well, I thought it was because I'm in China

yarcowang commented 9 years ago

Extremely slow in China. +1

$ composer global require fabpot/php-cs-fixer
Changed current directory to /Users/yarco/.composer
Please provide a version constraint for the fabpot/php-cs-fixer requirement: dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

  [Composer\Downloader\TransportException]                                                                                          
  The "http://pkg.phpcomposer.com/repo/packagist/p/composer/composer.json" file could not be downloaded (HTTP/1.1 502 Bad Gateway)  

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [packages1] ... [packagesN]

But i can get the file by browser...

alcohol commented 9 years ago

That's related to your connection. Nothing we can do about that.

macedd commented 9 years ago

A crowd sourced CDN would solve...

2015-04-17 5:37 GMT-03:00 Rob notifications@github.com:

That's related to your connection. Nothing we can do about that.

— Reply to this email directly or view it on GitHub https://github.com/composer/composer/issues/3156#issuecomment-93944137.

Thiago Fernandes Analista de Processos 34 9176- 4055 | thiago@internetbudi.com.br

stof commented 9 years ago

@thiagof pkg.phpcomposer.com is not related to Composer. the official domains for composer are getcomposer.org and packagist.org (and toranproxy.com in some ways). http://pkg.phpcomposer.com/ is a ToranProxy instance deployed by someone else.

dogmatic69 commented 9 years ago

I am in UK on reasonable line and composer has taken a dive in the last couple weeks. Takes ages to run an update

YetiCGN commented 9 years ago

I am on Windows 8.1, no VM. Composer is extremely slow as well. Now with profiling enabled, I see the following:

# composer -vvv update --profile
[3.3MB/0.01s] Reading ./composer.json
[3.3MB/0.01s] Loading config file C:/Users/jwagner.AD/AppData/Roaming/Composer/config.json
[3.4MB/0.01s] Loading config file ./composer.json
[3.8MB/0.02s] Executing command (CWD): git describe --exact-match --tags
[4.0MB/0.05s] Executing command (CWD): git branch --no-color --no-abbrev -v
[5.6MB/0.22s] Failed to initialize global composer: Composer could not find the config file: C:/Users/jwagner.AD/AppData/Roaming/Composer/composer.jso
n
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
[6.5MB/0.27s] Loading composer repositories with package information
[6.8MB/0.30s] Downloading https://packagist.org/packages.json
[6.9MB/1.56s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/packages.json into cache
[6.9MB/1.58s] Updating dependencies (including require-dev)
[7.1MB/1.59s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2013.json from cache
[7.1MB/1.59s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2014-07.json from cache
[7.1MB/1.59s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2014-10.json from cache
[7.1MB/1.60s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2015-01.json from cache
[7.1MB/1.68s] Downloading https://packagist.org/p/provider-2015-04$8083830c03f92c2e9d4359f589fe92dce5ae07edfac17476784bd202bf60a5fd.json
[33.0MB/4.75s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2015-04.json into cache
[31.4MB/4.77s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-archived.json from cache
[27.3MB/4.80s] Downloading https://packagist.org/p/provider-latest$10aa6a8c8abef8d548ca1583e9ce4ce3fcf9268cfadad656c10fad24272b4a44.json
[29.5MB/5.29s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-latest.json into cache
[29.0MB/5.31s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$lexer.json from cache
[29.0MB/5.31s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-psr$log.json from cache
[29.0MB/5.31s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$inflector.json from cache
[29.0MB/5.31s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-jdorn$sql-formatter.json from cache
[29.1MB/5.32s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$cache.json from cache
[29.2MB/5.33s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$doctrine-bridge.json from cache
[37.9MB/6.27s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$framework-bundle.json from cache
[41.4MB/6.48s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$security.json from cache
[43.1MB/6.64s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$doctrine-cache-bundle.json from cache
[43.2MB/6.65s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$common.json from cache
[43.3MB/6.67s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$config.json from cache
[44.0MB/6.74s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$http-kernel.json from cache
[46.1MB/6.91s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$filesystem.json from cache
[46.7MB/6.97s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$routing.json from cache
[47.8MB/7.08s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$stopwatch.json from cache
[48.2MB/7.12s] Downloading http://packagist.org/p/symfony/translation$0ee8183b8c18bd21624d41c0078cebe96b6c04fb176ef491f40cd03e89f914ce.json
[52.0MB/367.23s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$translation.json into cache
[49.1MB/367.31s] Downloading http://packagist.org/p/symfony/dependency-injection$d7755e1d0a765d210f4ef1769ed66469a15894bd0f008ec4e39cb79b73eb7305.json

[52.9MB/727.42s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-symfony$dependency-injection.json into cache
[50.0MB/727.50s] Downloading http://packagist.org/p/symfony/event-dispatcher$e2aa9670df4073a236393d77dabed3c88ce1d26311bf3ebd512153be27ec636b.json

Is there some sort of configurable timeout after 6 minutes?!? The above "Reading ... from cache" entries are the previous JSONs that already took their 6 minutes each from previous tries. This is really tedious!

alcohol commented 9 years ago

Can you share your composer version with us?

YetiCGN commented 9 years ago

Sure: Composer version 1.0-dev (bc45d9185513575434021527d7756420e9f4b2cf) 2015-05-11 14:49:39

Also still happening with the most current Composer version 1.0-dev (0ec86be5e988261e8b625ac696d566afa2c35faf) 2015-05-31 11:54:08

alcohol commented 9 years ago

Unfortunately I can't really make heads or tails out of this. It's clearly stuck on some sort of loop/timeout (I don't think we use any 6 minute timeouts in composer, but x times 1 or 2 minutes seems likely). Yet, at the end it does end up writing the json to the cache every time. Very peculiar, and pretty hard to debug :-(.

YetiCGN commented 9 years ago

Yes. I've already updated PHP from 5.6.3 to 5.6.9, deactivated APCu... I am just as clueless.

Edit: It's definitely not the PHP version, as I've tried with 5.5.23 and 5.4.39 as well to no avail.

alcohol commented 9 years ago

Do you have any composer plugins installed?

YetiCGN commented 9 years ago

No, how do I do that?! :-D I am thinking about checking out the master branch and poor-man-debug my way through the process.

alcohol commented 9 years ago

I'll assume you do not have plugins installed in that case. You could do the above yes.

Relevant functions to look at are (most likely):

YetiCGN commented 9 years ago

I guess not. ;) Thank you for the pointers, I will give it a try.

alcohol commented 9 years ago

On another note, could you also share your composer.json with us?

YetiCGN commented 9 years ago

It's a default Symfony full-stack installation.

alcohol commented 9 years ago

That was not my question :-(.

YetiCGN commented 9 years ago

Well, it happens regardless of the project or composer.json, but here is one example:

{
    "name": "jwagner/my_project",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "": "src/",
            "SymfonyStandard\\": "app/"
        }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "~2.7@beta",
        "doctrine/orm": "~2.2,>=2.2.3,<2.5",
        "doctrine/dbal": "<2.5",
        "doctrine/doctrine-bundle": "~1.4",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~3.0,>=3.0.12",
        "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
        "incenteev/composer-parameter-handler": "~2.0"
    },
    "require-dev": {
        "sensio/generator-bundle": "~2.3"
    },
    "scripts": {
        "post-root-package-install": [
            "SymfonyStandard\\Composer::hookRootPackageInstall"
        ],
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    }
}
alcohol commented 9 years ago

Could you try running the following in a empty temporary directory?

composer clear-cache
composer require -vvv --profile 'alcohol/phpsoundcloud:~3.0'
YetiCGN commented 9 years ago

Now that went really fast! :-O

O:\tmp>composer require -vvv --profile alcohol/phpsoundcloud:~2.0
[3.2MB/0.01s] Reading ./composer.json
[3.3MB/0.01s] Loading config file C:/Users/jwagner.AD/AppData/Roaming/Composer/config.json
[3.3MB/0.01s] Loading config file ./composer.json
[3.7MB/0.01s] Executing command (CWD): git describe --exact-match --tags
[3.9MB/0.04s] Executing command (CWD): git branch --no-color --no-abbrev -v
[3.9MB/0.07s] Executing command (CWD): hg branch
[4.0MB/0.08s] Executing command (CWD): svn info --xml
[5.1MB/0.11s] Failed to initialize global composer: Composer could not find the config file: C:/Users/jwagner.AD/AppData/Roaming/Composer/composer.jso
n
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
[5.4MB/0.12s] ./composer.json has been updated
[5.4MB/0.13s] Reading ./composer.json
[5.4MB/0.13s] Loading config file C:/Users/jwagner.AD/AppData/Roaming/Composer/config.json
[5.4MB/0.13s] Loading config file ./composer.json
[5.4MB/0.13s] Executing command (CWD): git describe --exact-match --tags
[5.4MB/0.16s] Executing command (CWD): git branch --no-color --no-abbrev -v
[5.4MB/0.18s] Executing command (CWD): hg branch
[5.4MB/0.19s] Executing command (CWD): svn info --xml
[5.5MB/0.22s] Failed to initialize global composer: Composer could not find the config file: C:/Users/jwagner.AD/AppData/Roaming/Composer/composer.jso
n
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
[5.7MB/0.24s] Reading ./composer.lock
[5.8MB/0.24s] Loading composer repositories with package information
[6.1MB/0.27s] Downloading https://packagist.org/packages.json
[6.1MB/1.53s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/packages.json into cache
[6.1MB/1.54s] Updating dependencies (including require-dev)
[6.4MB/1.55s] Downloading https://packagist.org/p/provider-2013$955d6103cd902fe6a153417659e8815657024a216bf35cfd5349907be2f1b975.json
[6.4MB/1.75s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2013.json into cache
[6.4MB/1.76s] Downloading https://packagist.org/p/provider-2014-07$291b16afff8a0bda8f85a7c7697ff3c3684f1376e75918d72065781cb8855f63.json
[6.4MB/1.95s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2014-07.json into cache
[6.4MB/1.96s] Downloading https://packagist.org/p/provider-2014-10$5f0bd333f88ad5c628063c132af1dcea872b51748407a4fcc832ed3915588797.json
[6.4MB/2.17s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2014-10.json into cache
[6.4MB/2.17s] Downloading https://packagist.org/p/provider-2015-01$c22772c8d3ca629258a0a1ad3510cc296f73a7de8ab8b73df3199f0f36329a38.json
[6.4MB/2.41s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2015-01.json into cache
[6.4MB/2.41s] Downloading https://packagist.org/p/provider-2015-04$be4a26c246ea707f66d2664e553d3276e7ba6ae9bb7ffd839bfdd7f7e94b1bc5.json
[32.3MB/4.02s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2015-04.json into cache
[30.7MB/4.05s] Downloading https://packagist.org/p/provider-archived$dfa1d92d2697fc375a1d522ab573634ee18807646f4abc322b6933157a07b829.json
[30.7MB/4.26s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-archived.json into cache
[26.5MB/4.30s] Downloading https://packagist.org/p/provider-latest$ee43e542171916dae2e70484e482f85bb30bf0c6dc5fd40b7b8ab73840364f16.json
[28.8MB/4.75s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-latest.json into cache
[28.3MB/4.78s] Downloading http://packagist.org/p/react/promise$4b018d58a378270ac2e1dc6c875c73a9342e6c9d2b3bfc79053a498a06029337.json
[28.3MB/4.87s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-react$promise.json into cache
[28.3MB/4.88s] Downloading http://packagist.org/p/guzzlehttp/streams$920e9591cfc08af64c3b2453eae8b3cd561eed19f8556ea0d0aaab6dc62e3f03.json
[28.4MB/4.97s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-guzzlehttp$streams.json into cache
[28.4MB/4.98s] Downloading http://packagist.org/p/guzzlehttp/ringphp$3da0bc323ba1287f0bd0e2782c7f4633d190b40bbcc9ffc4923e0c6de435b8a7.json
[28.5MB/5.08s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-guzzlehttp$ringphp.json into cache
[28.5MB/5.10s] Downloading http://packagist.org/p/guzzlehttp/guzzle$bf59865b71c22172eff6fe900792e8b1eb23f7b1f91cc97e3ddbbfc1bcec4b5a.json
[29.4MB/5.22s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-guzzlehttp$guzzle.json into cache
[30.1MB/5.39s] Downloading http://packagist.org/p/alcohol/phpsoundcloud$014ac64d3dd63b0af5a8902c9b0528cd694d1bc2b5ace9a96495a5f2f78de200.json
[30.1MB/5.49s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-alcohol$phpsoundcloud.json into cache
[30.7MB/5.62s] Nothing to install or update
[30.3MB/5.64s] Generating autoload files
[30.3MB/5.65s] Memory usage: 30.29MB (peak: 43.81MB), time: 5.65s

Now with the cache cleaned it's not all JSONs from the Symfony Composer file that stall:

O:\Projekte\explicatis.webpage\trunk\webpage_new>composer -vvv --profile update
[3.3MB/0.01s] Reading ./composer.json
[3.3MB/0.01s] Loading config file C:/Users/jwagner.AD/AppData/Roaming/Composer/config.json
[3.4MB/0.01s] Loading config file ./composer.json
[3.8MB/0.02s] Executing command (CWD): git describe --exact-match --tags
[4.0MB/0.05s] Executing command (CWD): git branch --no-color --no-abbrev -v
[5.3MB/0.10s] Failed to initialize global composer: Composer could not find the config file: C:/Users/jwagner.AD/AppData
/Roaming/Composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Starte
d" section
[6.1MB/0.15s] Loading composer repositories with package information
[6.5MB/0.18s] Downloading https://packagist.org/packages.json
[6.5MB/1.44s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/packages.json into cache
[6.5MB/1.47s] Updating dependencies (including require-dev)
[6.7MB/1.47s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2013.json from ca
che
[6.7MB/1.47s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2014-07.json from
 cache
[6.7MB/1.48s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2014-10.json from
 cache
[6.7MB/1.48s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2015-01.json from
 cache
[6.8MB/1.53s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-2015-04.json from
 cache
[31.0MB/1.73s] Reading C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-archived.json fr
om cache
[26.9MB/1.76s] Downloading https://packagist.org/p/provider-latest$ff7b1326b1e2b826195220cdf7496676815c4bd9055efb40422f0
931e0dab4d7.json
[29.2MB/2.13s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/p-provider-latest.json into
 cache
[28.6MB/2.16s] Downloading http://packagist.org/p/doctrine/lexer$ca2e7f3b9a4664e142a50ab5c8985bdd0e8a59dc161fd0486f8aa8c
755465cde.json
[28.7MB/2.24s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$lexer.jso
n into cache
[28.6MB/2.25s] Downloading http://packagist.org/p/psr/log$4df006588c370a8f6cb8cdf9ab8dc324637e778096d19df40448b7d62a3107
26.json
[28.7MB/3.40s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-psr$log.json into
cache
[28.6MB/3.40s] Downloading http://packagist.org/p/doctrine/inflector$caf0d38e3001eb2cbabe4192f701affcc10254307a3c01fa6b4
1a5579b2b648e.json
[28.7MB/3.51s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$inflector
.json into cache
[28.7MB/3.51s] Downloading http://packagist.org/p/jdorn/sql-formatter$08d420ab629c679809fbe03d4ccc2a739436b8d2189e994fcd
e26fa49ffb3115.json
[28.7MB/3.62s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-jdorn$sql-formatte
r.json into cache
[28.7MB/3.63s] Downloading http://packagist.org/p/doctrine/cache$d569be3f78cd7976d45f2b92cbeb692de9ab29b12d24094519f1804
f4e30540a.json
[28.8MB/3.72s] Writing C:\Users\jwagner.AD\AppData\Local\Composer/repo/https---packagist.org/provider-doctrine$cache.jso
n into cache
[28.8MB/3.73s] Downloading http://packagist.org/p/symfony/doctrine-bridge$1c8f17fe7574418583ee8493cf1d6fba63aeb5b02c389b
5efbfcab8c52735f59.json

Only the last one (doctrine-bridge) is stalling now...

alcohol commented 9 years ago

Well that is awkward. Maybe it is solver related then as @Seldaek suggested to me in a discussion I had with him on IRC. However, I don't really see how the solver gets called in between downloading a file and moving that file to the cache.

nevvermind commented 9 years ago

The Solver definitely does some heavy lifting after the package json is fetched and the resolution may take some time. @YetiCGN - check your CPU usage - it should be 100% for a while. That's Composer trying to solve your dependency graph. Or something of the sort.

Maybe a "Processing dependencies..." message after each JSON is fetched would be a good idea. People keep thinking it hanged, when it's in fact hard at work.

YetiCGN commented 9 years ago

No, unfortunately it really seems to be idling. The whole system is somewhere around 3% with PHP CLI showing some low percentage points and then dropping to 0%.

http://imgur.com/tyeTeVr

alcohol commented 9 years ago

The only consistency I can find is the 6 minute interval. But as I said before, I don't believe there are any actions in composer that have a timeout defined of 6 minutes. Most likely it's an iteration of timeouts. But which and where and why... that remains the question. There is also the default process-timeout value of 300 (that leaves a minute unaccounted for though).