Closed marijn closed 12 years ago
@naderman :
string(20) "Pool::addRepository before: 3458040"
string(19) "Pool::addRepository after: 3569128"
string(20) "Pool::addRepository before: 3569168"
string(19) "Pool::addRepository after: 3617800"
string(20) "Pool::addRepository before: 3617800"
string(19) "Pool::addRepository after: 3711864"
string(20) "Pool::addRepository before: 3711872"
string(20) "Pool::addRepository after: 27531656"
string(27) "Solver - Memory (usage) before new: 27626896"
string(26) "Solver - Memory (usage) after new: 28034944"
string(30) "Solver - Memory (usage) after solve(): 74714656"
string(30) "Solver - Memory (peak) after solve(): 93916072"
Average:
Thanks, I have a couple of ideas, will look into it.
I'm also encountering this problem
php composer.phar -V Composer version 1a25542
{ "require": { "php": ">=5.3.2", "symfony/symfony": ">=2.1.0-dev", "doctrine/orm": ">=2.2.0-dev", "twig/extensions": "", "symfony/assetic-bundle": "2.0.", "sensio/generator-bundle": "2.0.", "sensio/framework-extra-bundle": "2.0.", "sensio/distribution-bundle": "2.0.", "jms/security-extra-bundle": "1.0." },
"autoload": {
"psr-0": {
"Acme": "src/"
}
}
}
This appears to be an issue with resolving conflicting versions. I've been able to reproduce this error with the following composer.json:
{
"name": "a/project",
"description": "A Project",
"require": {
"sonata-project/media-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "2.0.*"
}
}
Manual inspection of the composer.json files for each project indicates conflicting versions:
media-bundle/dev-master requires symfony 2.1. doctrine-orm-admin-bundle/2.0.* requires symfony 2.0.
The result of running composer.phar install
is:
tru-66:derp ramzey$ ./composer.phar install
Installing dependencies
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6996925 bytes) in phar:///Users/ramzey/derp/composer.phar/src/Composer/DependencyResolver/Problem.php on line 36
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6996925 bytes) in phar:///Users/ramzey/derp/composer.phar/src/Composer/DependencyResolver/Problem.php on line 36
it was my understanding that most of the dev-master branches are for 2.1
Also, I upgraded composer again after reporting this and temporarily increased my memory allocation and it solved my issues, but still seemed a bit high on the mem usage.
Also, I thought i had updated my issue, I upgraded composer again after reporting this and temporarily increased my memory allocation and it solved my issues, but still seemed a bit high on the mem usage.
Since yesterday, I am also experiencing this issue with composer. Trying to install Behat/Mink using Composer. Not sure if Changing php.ini will solve it ?
$ php composer.phar install
BC warning: your lock file appears to be of an older format than this composer version, it is recommended to run composer update Installing dependencies from lock file PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2715178 bytes) in phar:///Users/
Any suggestions appreciated .. Thanks
@Seldaek So after the refactoring of the solver, only some packages are needed by the solver anymore. However whatProvides will still need to work correctly which requires the loading of a complete map, however this should open up the possibility to iterate over packages and freeing their memory after to build up the initial map, and to then lazily load packages that are actually needed.
I built a phar so that you can test the patch for the memory issues. Given the extensive changes I'd appreciate if a few people try it before we merge this. See https://github.com/composer/composer/pull/1015#issuecomment-7988058 for details.
I had the same issue, actually taking out repositories from composer.json solved the problem for me.. (which wouldn't solve the same for others .... )
I am also having this problem. Clean install, no lock file or vendor directory.
"require": {
"symfony/framework-standard-edition": "2.*",
"monolog/monolog": "1.*",
"swiftmailer/swiftmailer": "4.*",
"mopa/bootstrap-bundle": "2.1.x-dev",
"recaptcha/php5": "dev-master",
"knplabs/knp-menu-bundle": "2.0.x-dev"
},
Is there any fix yet?
This has been addressed recently by #1168 - memory usage is perhaps not optimal yet but it's reduced quite a bit and especially mostly depends on your project complexity now not the amount of packages in packagist.
My composer configuration
Composer version:
b999d18