Hi Guys,

I am receiving this message when trying to access my calendar module:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 77824 bytes)

I have already increased the PHP memory to 16 as in the drupal documentation, as you can see but dont know what to do now?

Any ideas?

Thanks in advance.

Rob

Comments

yelvington’s picture

PHP memory requirements can vary significantly depending on the modules in use on your site. Drupal 6 core requires PHP's memory_limit to be at least 16MB, and Drupal 7 core requires 40MB. Warning messages will be shown if the PHP configuration does not meet these requirements. However, while these values may be sufficient for a default Drupal installation, a production site with a number of commonly used modules enabled (CCK, Views etc.) could require 64 MB or more. Some installations may require much more, especially with media-rich implementations. If you are using a hosting service it is important to verify that your host can provide sufficient memory for the set of modules you are deploying or may deploy in the future. (See the Increase PHP memory limit page in the Troubleshooting FAQ for additional information on modifying the PHP memory limit.)

"At least."

An out-of-memory message means you're out of memory. Allocate more.

Bushidoman’s picture

I have just moved to a VPS client with Hostgator with unlimited PHP memory. I just got off the phone with them and they increased my memory to 512M and I'm still getting the same Fatal error message:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /home/xxxx/public_html/includes/cache.inc on line 33

I think there is something more going on here than just PHP memory issues. I hope someone can resolve this situation since the cost to operate my site has more than tripled!

hey_germano’s picture

Even if your host allows high memory usage, you'll still need to tell Drupal that it can use it. Try adding ini_set('memory_limit', '128M'); to the PHP settings section of your settings.php file.

ichag’s picture

this worked fine to me. the server is exposed to set this value in php.ini, but in settings.php it works fine.

LOT

ichag

Road Kill’s picture

Hi Bushidoman did you by any chance find the cause of this problem.
I also think the problem is more than just a php issue because I have increased my memory to 128 but I am still getting this error when installing a module running cron or flushing cache.

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 69 bytes) in C:\wamp\www\ppeng\includes\file.inc on line 2033

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 122880 bytes) in C:\wamp\www\ppeng\sites\all\modules\views\modules\system.views.inc on line 209

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 69 bytes) in C:\wamp\www\ppeng\modules\system\system.module on line 2374
Call Stack

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in C:\wamp\www\ppeng\includes\menu.inc on line 3483

todd zebert’s picture

subscribe

IT Sherpa: CTO, Founder, Full stack Dev, Drupal, Wordpress, more. Crushing on Angular, Node, JS & embedded C/C++.
Organizer for Drupal LA https://groups.drupal.org/la Meetup and 2016, 17, 18 LA Camps https://drupalcampla.com/

tesmon’s picture

subscribe

christopher james francis rodgers’s picture

For a detailed step-by-step solution to this memory error problem
for both Drupal 6 and Drupal 7 to easily increase the memory allocation to 128M, see...
http://drupal.org/node/76156#comment-4582924

..or..

Drupal 7 memory increase to more than 128M,
that may or may not work for Drupal 6, see...
http://drupal.org/node/76156#comment-4583384


All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *