On my Drupal 6 website, when I run cron manually the following error message shows up:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4181580 bytes) in /dirname/includes/database.mysql-common.inc on line 34

Cron is set to run every night automatically, but for a few days it was not running, so I tried it manually.

For Drupal, where should I increase memory? Should it be in settings.php, php.ini for php, or somewhere else? I'm using AWS RDS & EC2 instances.

I have this in the settings.php file:

ini_set('memory_limit', '128M');

Some help would be much appreciated.


All you need to do is increase your PHP Memory Limit from 128M to 265M

In settings.php:

ini_set('memory_limit', '256M')

For more info/other ways to change it, see Changing PHP memory limits

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.