I'm using Drupal 4.6 on a SuSE 9.3 machine, using Apache 2.0 and mySQL 3.23. The average numbers of visitors is 400 (Drupal's count in the Who's online box). So far I'm impressed with the possibilites Drupal offers and its advantages over other CMS. BUT - and it's a big BUT - two or three times a day my DRUPAL install crashed, displaying an empty site while the error_log complains about "client denied by server configuration". When I tried to follow up on this error, I stumbled across an "Allowed memory size of 8388608 bytes exhausted (tried to allocate 64 bytes)" in access.log. I increased memory_limit in php.ini from 8M to 12M. Again, a few days later the site crashed again, same error again. I increased the memory_limit to 16M and later - same happened again a few days later - to 32M. So far the site didn't crash again - but pleeeeease, is Drupal serious? Why does it need such a high memory_limit? Is this something I can influence by configuration?

Comments

killes@www.drop.org’s picture

Drupal's memory requirements depend on a number of factors. One is the number of modules used and others include the size of the memory structures loaded from the SQL tables.
--
Drupal services
My Drupal services

zeitenflug’s picture

I'm not using many modules. Mainly node and taxonomy. All others not set on required are disabled. I have 4800 nodes and 15000 taxonomy terms of 12 vocabularies with "complex hierarchies" enabled. I used PostNuke before I discovered Drupal. I'm glad I'm not using PN anymore since it's too buggy, but it easily handled twice those data without complaining about the 8M limit. I don't think Drupal really loads all the terms or nodes at once, there's no need for it - so I wonder why it needs to allocate this much memory.

How can I find out what exactly is causing this memory mess in my case?

killes@www.drop.org’s picture

15000 taxo terms are quite a lot. Do you really need all of them? It is possible that the way the terms are loaded uses a lot of memory.
--
Drupal services
My Drupal services

Brian@brianpuccio.net’s picture

Off the top of my head, all I remember is this discussion about large taxonomies and memory use. There is a patch/fix mentioned, if you could find that, it might help greatly.

zeitenflug’s picture

Perfect Brian. Thanks for the node link.

iantresman’s picture

I solved this by adding the following line to my .htaccess file:

php_value memory_limit 24M

More details described here.