Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer is losing memory_limit when starting process without xdebug #6004

Closed
oleg-andreyev opened this issue Dec 28, 2016 · 4 comments
Closed
Labels

Comments

@oleg-andreyev
Copy link
Contributor

When I run this command:

php -dmemory_limit=3G composer.phar update symfony/symfony --prefer-stable --with-dependencies
// or
php -dmemory_limit=-1 composer.phar update symfony/symfony --prefer-stable --with-dependencies

I get the following output:

PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <...>

And I expected this to happen:

  • composer update should pass

Reason:

Composer is starting new process without memory_limit and uses default one (1G):

'/usr/bin/php' '-c' '/tmp/kaoOdw' 'composer.phar' 'update' '--ansi' 'symfony/symfony' '--prefer-stable' '--with-dependencies' '-vvv'
@alcohol
Copy link
Member

alcohol commented Dec 29, 2016

@johnstevenson I think this is an edge case we did not entirely take into account..

@alcohol alcohol added the Bug label Dec 29, 2016
@johnstevenson
Copy link
Member

@alcohol Not so much not taken into account, but more didn't know what to do with I'm afraid!

We don't have direct access to user-supplied php params so it would be a case of second guessing what options might be used. There are various things you can do to compare a current ini setting to what is in an ini file but it is not going to be foolproof.

@johnstevenson
Copy link
Member

@alcohol I need to change the tmp ini file creation, as per #5995, so I'll incorporate some ini-setting comparison logic as well.

@Seldaek
Copy link
Member

Seldaek commented Dec 30, 2016

I did a quick fix for the memory_limit for now. I don't know if we really need to support all ini settings or not.. I kinda doubt there are a lot in wide use, but memory_limit is kinda critical here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants