[development] allowed memory size exhausted

Ashraf Amayreh mistknight at gmail.com
Fri Jan 14 21:20:28 UTC 2011


Thanks all,

It was a module causing this. Although I was surprised why a module related
caching issue would be called in update.php

The lighbox2 module was causing an abnormal size to be stored in the cache
table, it seems this size is something around my memory limits which I
should reduce now that the problem is solved (suggestions?). I did a quick
search on the lighbox2 issues and found this, which details this issue. Word
of caution, be careful if you're using imagecache with a large number of
presets and lightbox2, it could potentially cripple your server.

http://drupal.org/node/409354

Best Regards,



> On Fri, Jan 14, 2011 at 6:39 PM, Zareef Ahmed <zareef at zareef.net> wrote:
>
>> To debug why your code is requesting this kind of memory you can try
>> following steps.
>>
>> 1. First increase the memory in your ini SO you can get rid of this memory
>> allocation error, you can try to increase this to around 1 GB or something
>> similar (depends how much memory you have on your machine)... If even
>> increasing memory upto that HUGE level does not help you, then something is
>> really really WRONG with your setup, which need to be looked upon within
>> code for some loops or something like that.
>>
>> 2. If you are able to run your application by increasing Memory, please
>> install APD on your server. see http://in.php.net/apd
>> Use APD to track which functions are taking more memory to debug your
>> application.
>>
>>
>> Also check if problem is  new on this server and application runs fine or
>> other machine with different version of PHP, in some recent versions of PHP
>> few functions behavior has been changed due to which few scripts or older
>> module behave in unexpected way..
>>
>>
>> Thanks and Regards
>> Zareef Ahmed
>>
>>
>> On Fri, Jan 14, 2011 at 7:12 PM, Pierre Rineau <
>> pierre.rineau at makina-corpus.com> wrote:
>>
>>>
>>> > [Fri Jan 14 11:02:21 2011] [error] [client 1.2.3.4] PHP Fatal error:
>>> > Allowed memory size of 335544320 bytes exhausted (tried to allocate
>>> > 22175001 bytes) in /var/www/abc/includes/database.mysql-common.inc on
>>> > line 34
>>>
>>> Did you really allowed 320M of memory for PHP scripts execution or I
>>> miscalculated?!
>>>
>>> This is howfully huge!
>>>
>>> What are you trying to do here that could consume something like 10
>>> times the "normal" drupal memory consumption?
>>>
>>> Pierre.
>>>
>>>
>>>
>>
>>
>> --
>> Zareef Ahmed
>> http://www.zareef.net
>>
>
>
>
> --
> Zareef Ahmed
> http://www.zareef.net
>
>
> ---------- Forwarded message ----------
> From: Zareef Ahmed <zareef at zareef.net>
> To: development at drupal.org, pierre.rineau at makina-corpus.com
> Date: Fri, 14 Jan 2011 18:39:11 +0530
> Subject: Re: [development] allowed memory size exhausted
> To debug why your code is requesting this kind of memory you can try
> following steps.
>
> 1. First increase the memory in your ini for you can get rid of this memory
> allocation error, you can try to increase this to around 1 GB or something
> similar (depends how much memory you have on your machine)... If even
> increasing memory upto that HUGE level does not help you, then something is
> really really WRONG with your setup, which need to be looked upon within
> code for some loops or something like that.
>
> 2. If you are able to run your application by increasing Memory, please
> install APD on your server. see http://in.php.net/apd
> Use APD to track which functions are taking more memory to debug your
> application.
>
>
> Also check if problem is  new on this server and application runs fine or
> other machine with different version of PHP, in some recent versions of PHP
> few functions behavior has been changed due to which few scripts or older
> module behave in unexpected way..
>
>
> Thanks and Regards
> Zareef Ahmed
>
> On Fri, Jan 14, 2011 at 7:12 PM, Pierre Rineau <
> pierre.rineau at makina-corpus.com> wrote:
>
>>
>> > [Fri Jan 14 11:02:21 2011] [error] [client 1.2.3.4] PHP Fatal error:
>> > Allowed memory size of 335544320 bytes exhausted (tried to allocate
>> > 22175001 bytes) in /var/www/abc/includes/database.mysql-common.inc on
>> > line 34
>>
>> Did you really allowed 320M of memory for PHP scripts execution or I
>> miscalculated?!
>>
>> This is howfully huge!
>>
>> What are you trying to do here that could consume something like 10
>> times the "normal" drupal memory consumption?
>>
>> Pierre.
>>
>>
>>
>
>
> --
> Zareef Ahmed
> http://www.zareef.net
>
>
> ---------- Forwarded message ----------
> From: Frederik Grunta <fgrunta at gmail.com>
> To: development at drupal.org
> Date: Fri, 14 Jan 2011 13:22:36 +0000
> Subject: Re: [development] allowed memory size exhausted
> Just because the stack trace doesn't show the error going through custom
> modules doesn't mean that it's not a custom modules fault.
>
> An out of memory exception will be thrown the moment that a piece of code
> attempts to allocate an amount of memory which would put it over the memory
> limit. It does not mean that a piece of code is necessarily faulty. This
> means that module A could allocate 299 MB of memory, then when module B is
> called, it needs 1 MB, and the stack trace would show the call going via
> module B.
>
> As Zereef has said, if worst comes to worst, a memory profiler should help
> you diagnose the problem.
>
> - Frederik
>
> On 14 January 2011 13:14, Zareef Ahmed <zareef at zareef.net> wrote:
>
>> I believe you got the message .. as some sentence were not in flow due to
>> my fast typing  .. :)
>>
>> On Fri, Jan 14, 2011 at 6:39 PM, Zareef Ahmed <zareef at zareef.net> wrote:
>>
>>> To debug why your code is requesting this kind of memory you can try
>>> following steps.
>>>
>>> 1. First increase the memory in your ini SO you can get rid of this
>>> memory allocation error, you can try to increase this to around 1 GB or
>>> something similar (depends how much memory you have on your machine)... If
>>> even increasing memory upto that HUGE level does not help you, then
>>> something is really really WRONG with your setup, which need to be looked
>>> upon within code for some loops or something like that.
>>>
>>>
>>> 2. If you are able to run your application by increasing Memory, please
>>> install APD on your server. see http://in.php.net/apd
>>> Use APD to track which functions are taking more memory to debug your
>>> application.
>>>
>>>
>>> Also check if problem is  new on this server and application runs fine or
>>> other machine with different version of PHP, in some recent versions of PHP
>>> few functions behavior has been changed due to which few scripts or older
>>> module behave in unexpected way..
>>>
>>>
>>> Thanks and Regards
>>> Zareef Ahmed
>>>
>>>
>>> On Fri, Jan 14, 2011 at 7:12 PM, Pierre Rineau <
>>> pierre.rineau at makina-corpus.com> wrote:
>>>
>>>>
>>>> > [Fri Jan 14 11:02:21 2011] [error] [client 1.2.3.4] PHP Fatal error:
>>>> > Allowed memory size of 335544320 bytes exhausted (tried to allocate
>>>> > 22175001 bytes) in /var/www/abc/includes/database.mysql-common.inc on
>>>> > line 34
>>>>
>>>> Did you really allowed 320M of memory for PHP scripts execution or I
>>>> miscalculated?!
>>>>
>>>> This is howfully huge!
>>>>
>>>> What are you trying to do here that could consume something like 10
>>>> times the "normal" drupal memory consumption?
>>>>
>>>> Pierre.
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Zareef Ahmed
>>> http://www.zareef.net
>>>
>>
>>
>>
>> --
>> Zareef Ahmed
>> http://www.zareef.net
>>
>
>
>
> ---------- Forwarded message ----------
> From: Blake Senftner <bsenftner at earthlink.net>
> To: development at drupal.org
> Date: Fri, 14 Jan 2011 06:12:16 -0800
> Subject: [development] image cache api to delete node images
> Has anyone written logic to delete a single node's image cache entries upon
> that node's delete?
>
> Sincerely,
> -Blake
> bsenftner at earthlink.net
> www.BlakeSenftner.com
> www.MissingUbercartManual.com
>
>
> --
> [ Drupal development list | http://lists.drupal.org/ ]
>



-- 
Ashraf Amayreh
CEO | O-Minds
Cell. 962 78 8099997
Tel. 962 6 5655150
Fax. 962 6 5675150
Skype: aamayreh

www.o-minds.com
web development | web design
user experience | branding design

Connect with us on Twitter
http://twitter.com/ominds

Connect with us on LinkedIn
http://www.linkedin.com/in/aamayreh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110114/b54cf7af/attachment-0001.html 


More information about the development mailing list