On Wed, Apr 2, 2008 at 3:12 AM, Graeme McKibbin <<a href="mailto:gmckibbin@iburst.co.za">gmckibbin@iburst.co.za</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div>Hi,</div>I'm getting the following error on a site,<div><div style="margin: 0px;"><font style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3">"<b>Fatal error:</b> Allowed memory size of 20971520 bytes exhausted (tried to allocate 1077617 bytes) in...sites/all/modules/views-5.x-1.6/views_cache.inc on line 146"</font></div>
<div style="margin: 0px;"><br></div><div style="margin: 0px;">The site basically has a content type with many computed and other fields, but no images or large files etc. So I'm wondering why it requires so much memory. I presume it's something to do with caching?</div>
<div style="margin: 0px;"><br></div><div style="margin: 0px;">I'd asked the host to increase the max packets allowed and they made it 20M, but that still doesn't work. So I've requested it to be increased to 32M. But I'm concerned that in the future, I'll run into the same problem. </div>
<div style="margin: 0px;">Is there another a way to fix this?</div></div></div></blockquote></div><br>Graeme<br><br>Drupal itself (core) does not use a lot of memory.<br><br>When you start adding contrib modules, taxonomies and such, things are different.<br>
<br>Normally, people fall victim to the open buffet syndrome.<br><a href="http://2bits.com/articles/server-indigestion-the-drupal-contributed-modules-open-buffet-binge-syndrome.html">http://2bits.com/articles/server-indigestion-the-drupal-contributed-modules-open-buffet-binge-syndrome.html</a><br clear="all">
<br>Here is a patch that would allow you to measure which module eats up memory so you can attack the problem where it is.<br>
<a href="http://2bits.com/articles/measuring-memory-consumption-by-drupal-bootstrap-and-modules.html">http://2bits.com/articles/measuring-memory-consumption-by-drupal-bootstrap-and-modules.html</a><br>
<br>Here is another case where a module was modified (for something else) but memory size was less after the change.<br><a href="http://2bits.com/articles/bottleneck-replacing-taxonomy-term-count-nodes-in-taxonomy-dhtml.html">http://2bits.com/articles/bottleneck-replacing-taxonomy-term-count-nodes-in-taxonomy-dhtml.html</a><br>
<br>Also, using an op-code cache should make memory consumption by code go down significantly. Try APC or xcache and see. If it is a data set size issue, that will not help much.<br><br>When you think about it 32M is not much. Ubuntu server now comes with a default settings of 128M for PHP5.<br>
-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.