I've made a drush install of drupal 7.28 on my AWS server. I can confirm that the memory is set to 128M, all green on the reports -> site status page. The website will function normally and sporadically return no data, looking at the logs a tremendous amount of memory is trying to be allocated (assuming an infinite loop somewhere). Given that this is a basic install, no modules have yet been added what might be causing this?

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 140008587493184 bytes) in Unknown on line 0

1 Answer 1


Note that Drush and Drupal use different php.ini files. This behavior is inherited from php, which allows for different configuration for commandline tools vs. web servers, so that your web server can be more locked down than your dev tools.

Use the drush status command to see the path to the php.ini file that Drush is using.

Use the drush status-report command to see the commandline equivalent of the reports -> site status page. This will show you the real memory limit that is set for Drush.

Odds are, all you will need to do is change the memory limit setting in the php.ini file that Drush is using, and all will be well.

  • I ran the status command, Drush is running off a php.ini that is set to -1 (unilimited) I know thats not good practice but Drush has the warpspeeds. Still having intermittent memory outages. Jul 1, 2014 at 20:02
  • drush ev 'return ini_get("memory_limit");' should return -1 if in fact Drush is using the php.ini you think it is. If this is the case, maybe you really are running out of memory for some reason. Jul 1, 2014 at 20:05
  • That command didn't return anything, though its not Drush that is causing the memory issue (at least as I see it) the site while being used via a web browser is causing the memory errors Jul 2, 2014 at 13:41
  • 1
    Are you using Drush 5 or older? drush ev 'print ini_get("memory_limit");' Jul 3, 2014 at 15:32
  • Greg, you da man! Was using drush 4.5 (default from the installer) updated to 5.0-dev and that ev command returns -1 so the memory is still unrestricted. I'll retry the install on the site and hopefully that'll fix it. Thank you! Jul 3, 2014 at 16:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.