Composer is memory intensive sometimes, so when the composer module runs as a download hook, it was running out of memory. Not a drush problem, and fixed by overriding the memory_limit for a specific command:

php --define memory_limit=-1 /usr/share/php/drush/drush.php dl gelf

But when I try to override the memory_limit for make, it seems that I can't override it. I imagine it's using shell_exec and starting a new subprocess where the --define flag isn't respected, but I'm not sure where to start looking for a solution.

Yeah, I could mess with php.ini, but I'd rather a more sustainable solution if possible :)

Steps to reproduce (on *nix system with vbox)

# Install RVM
curl -L get.rvm.io | bash -s 1.14.1
exec $SHELL
rvm reload

# Spin up development VM
git clone --branch release/1.0.0 https://github.com/myplanetdigital/ariadne.git /tmp/ariadne-drush-issue
cd /tmp/ariadne-drush-issue
rake setup
vagrant up

# Configure VM
vagrant ssh
cd /vagrant/data/html/example
drush dl composer
drush dl gelf #FAIL
php --define memory_limit=-1 /usr/share/php/drush/drush.php dl gelf #WIN
# The following fails...
php --define memory_limit=-1 /usr/share/php/drush/drush.php make php://stdin /tmp/gelf-test << EOH
core = 7.x
api = 2

projects[drupal][version] = 7.14
projects[gelf][version] = 1.x-dev
EOH

Steps to cleanup

cd /tmp/ariadne-drush-issue
vagrant destroy --force

Comments

patcon’s picture

Issue summary: View changes

clarifying comments in code block

moshe weitzman’s picture

Category: bug » support
Status: Active » Fixed

We support a drush.ini file that overrides pho.ini entries even on sub process. See 'drush topic' item.

patcon’s picture

Sahweet.. thanks moshe!

patcon’s picture

Status: Fixed » Closed (works as designed)
patcon’s picture

Issue summary: View changes

code block: `drush dl gelf` should run in docroot so that site bootstrapped