Quick Tip: Drupal Drush Out of Memory Error on Ubuntu
I recently started running into out of memory errors while running Drupal's awesome Drush module from the command line to update a sites modules.
This is odd as on my dev machine I've set up my php.ini to reserve 512MB of RAM (memory_limit=512M). That should be plenty!
I temporally upped the RAM to 2GB(!!) and was still getting out of memory errors when running Drush!
Now, I'm a relative n00b when it comes to Ubuntu and Linux, but a bit of digging around on the web provided a solution:
PHP has *TWO* php.ini files! One for apache (/etc/php5/apache2/php.ini) and one for the cli (/etc/php5/cli/php.ini).
Drush runs from the command line, so you need to up the memory in the cli php.ini
Makes sense, but took me 1/2 an hour to work it out.


Comments
Post new comment