On my Drupal 7 site once I have around 1500 records associated to a given content type then when viewing any of these nodes instead of seeing the content I sometimes get the following error message "Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8 bytes) in /www/dev/drupal/includes/cache.inc on line 434". If I have less than 1500 records for a given content type (i.e. 1000 records) then viewing any of these contents always display without this error. How can I prevent this error from occurring for a given content type that has at least 1500 records associated to it.

  • Sorry, but only you can identify exact conditions that exhaust your memory, and the guilty module / theme. And if you did, please edit your question for clarity. Only sure, universal way is simply to allow for larger amount of memory. – Mołot Jun 5 '14 at 15:24

If you work in localhost, change memory_limit in your {php_installation_dir}/php.ini to a higher one. Otherwise ask your web hosting service to increase the memory limit of the server. (You can check your PHP memory limit in your Drupal site too: /admin/reports/status)

| improve this answer | |
  • 256MB is extremely high. Increasing ad-infinitum would likely still produce the error he's having. – Johnathan Elmore Jan 9 '15 at 20:00

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