Closed (fixed)
Project:
Composer
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2012 at 16:49 UTC
Updated:
13 Mar 2013 at 18:50 UTC
Running drush dl gelf with composer module installed throws the error below. Shouldn't 160M php memory be enough?
Install location /vagrant/data/html/example/sites/all/modules/gelf already exists. Do you want to overwrite it? (y/n): y
Calling _drush_recursive_copy(/tmp/drush_tmp_1341592633_4ff71439a9e01/gelf, /vagrant/data/html/example/sites/all/modules/gelf) [6.11 sec, 37.12 MB] [debug]
Project gelf (7.x-1.x-dev) downloaded to /vagrant/data/html/example/sites/all/modules/gelf. [6.15 sec, 37.12 MB] [success]
PHP Fatal error: Allowed memory size of 167772160 bytes exhausted (tried to allocate 305529 bytes) in /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Json/JsonFile.php on line 275
PHP Stack trace:
PHP 1. {main}() /usr/share/php/drush/drush.php:0
PHP 2. drush_main() /usr/share/php/drush/drush.php:14
PHP 3. _drush_bootstrap_and_dispatch() /usr/share/php/drush/drush.php:59
PHP 4. drush_dispatch() /usr/share/php/drush/drush.php:90
PHP 5. call_user_func_array() /usr/share/php/drush/includes/command.inc:165
PHP 6. drush_command() /usr/share/php/drush/includes/command.inc:165
PHP 7. _drush_invoke_hooks() /usr/share/php/drush/includes/command.inc:198
PHP 8. call_user_func_array() /usr/share/php/drush/includes/command.inc:324
PHP 9. drush_pm_download() /usr/share/php/drush/includes/command.inc:324
PHP 10. drush_command_invoke_all() /usr/share/php/drush/commands/pm/download.pm.inc:205
PHP 11. call_user_func_array() /usr/share/php/drush/includes/command.inc:1179
PHP 12. drush_command_invoke_all_ref() /usr/share/php/drush/includes/command.inc:1179
PHP 13. call_user_func_array() /usr/share/php/drush/includes/command.inc:1195
PHP 14. composer_drush_pm_post_download() /usr/share/php/drush/includes/command.inc:1195
PHP 15. drush_composer() /home/vagrant/.drush/composer/composer.drush.inc:109
PHP 16. Composer\Console\Application->run() /home/vagrant/.drush/composer/composer.drush.inc:91
PHP 17. Symfony\Component\Console\Application->run() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Console/Application.php:66
PHP 18. Composer\Console\Application->doRun() /home/vagrant/.drush/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:106
PHP 19. Symfony\Component\Console\Application->doRun() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Console/Application.php:86
PHP 20. Symfony\Component\Console\Command\Command->run() /home/vagrant/.drush/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:193
PHP 21. Composer\Command\InstallCommand->execute() /home/vagrant/.drush/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:239
PHP 22. Composer\Installer->run() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Command/InstallCommand.php:64
PHP 23. Composer\Installer->doInstall() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Installer.php:178
PHP 24. Composer\DependencyResolver\Pool->addRepository() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Installer.php:247
PHP 25. Composer\Repository\ArrayRepository->getPackages() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/DependencyResolver/Pool.php:66
PHP 26. Composer\Repository\ComposerRepository->initialize() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Repository/ArrayRepository.php:144
PHP 27. Composer\Repository\ComposerRepository->loadRepository() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php:104
PHP 28. Composer\Json\JsonFile->read() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php:134
PHP 29. Composer\Json\JsonFile::parseJson() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Json/JsonFile.php:90
PHP 30. json_decode() /home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Json/JsonFile.php:275
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Allowed memory size of 167772160 bytes exhausted (tried to allocate 305529 bytes) in
/home/vagrant/.drush/composer/vendor/composer/composer/src/Composer/Json/JsonFile.php, line 275 [20.64 sec, 159.74 MB]
vagrant@lucid64:/vagrant/data/html/example$
Steps to reproduce (on a Mac):
curl -L get.rvm.io | bash -s 1.14.1
exec $SHELL
rvm reload
git clone --branch release/1.0.0 https://github.com/myplanetdigital/ariadne.git /tmp/ariadne-composer-bug
cd /tmp/ariadne-composer-bug
rake setup
vagrant up
vagrant ssh
cd /vagrant/data/html/example
drush dl composer
drush dl gelf
Cleanup
cd /tmp/ariadne-composer-bug
vagrant destroy --force
Comments
Comment #1
robloachUpping memory usage, or upping to PHP 5.4 will fix. There's also these:
https://github.com/composer/composer/issues/456
https://github.com/composer/composer/issues/600
Comment #2
patcon commentedYep, I set it to unlimt and it was fine.
RE: https://github.com/composer/composer/issues/456#issuecomment-6326818
Hm. I would've thought alpha4 would contain the memory boost that was referred to...
http://drupalcode.org/project/composer.git/blob/refs/heads/7.x-1.x:/comp...
Comment #3
robloachTry out http://getcomposer.org/composer-new.phar too. Seldaek has been working on some memory management stuff.
Comment #4
robloachUpdates were merged and memory shouldn't be that bad anymore.
Comment #5.0
(not verified) commentedClarifying vagrant cleanup