I have been facing some weird memory limit issues on a managed dedicated server and spent alot of time trying to fix this other with the server admin. phpinfo() is showing the correct overridden memory_limit values. Everything is cool, except when I use drush to do drush en module or Views Bulk Operation execution. If anyone has experienced this before, I will really appreciate if you can share with us the steps needed to fix this.

In my php.ini :memory_limit = 256M ;

In sites/default/settings.php: ini_set('memory_limit', '256M');

The WSOD message after executing a Views Bulkd Operations on ONE entry: Fatal error: Out of memory (allocated 131334144) (tried to allocate 5 bytes) in /public_html/includes/cache.inc on line 401 Memory used at: devel_boot()=5.02 MB, devel_shutdown()=82.06 MB, PHP peak=82.25 MB.

In SSH, using drush cli. After running drush en languageassign: The following extensions will be enabled: languageassign Do you really want to continue? (y/n): y

Fatal error: Out of memory (allocated 76021760) (tried to allocate 72 bytes) in /public_html/sites/all/modules/views/includes/base.inc on line 84

Drush command terminated abnormally due to an unrecoverable error. [error]

Error: Out of memory (allocated 76021760) (tried to allocate 72 bytes) in /public_html/sites/all/modules/views/includes/base.inc, line 84

  • are you sure init_set is enabled and can modify your settings to that value?
    – PartySoft
    Sep 8 '11 at 9:30

Try including "RLimitMem 128000000" in your .htacess file.


Another place where the memory_limit could be set is your .htaccess file. For drush also check out the cli php.ini file, usually found at /etc/php5/cli/php.ini

To check if you correctly set memory_limit try this:

When running drupal from the webserver you can do this by going to admin/reports/status/php

For drush you can check your php settings by running this command: php -i | grep memory_limit

  • 1
    # php -i | grep memory_limit memory_limit => 256M => 256M
    – Logi
    Sep 8 '11 at 17:55
  • In admin/reports/status/php, under memory_limit value is 256M
    – Logi
    Sep 8 '11 at 17:58

are you sure init_set is enabled and you can modify your settings to that value?

most shared/dedicated servers have a limit for some settings or ignore ini_set commands

  • Yea, I'm very sure it works, because the updated value is reflected in phpinfo()
    – Logi
    Sep 8 '11 at 17:59

Set memory limit in setting. php file using ini_set('memory_limit' '256M'). Also you need to check your php execution time because vbo need more time to executive the operation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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