Re: Fatal Error while installing a module

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Fatal Error while installing a module

by Saifi Khan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 25 Jun 2009, Kartik Nayak wrote:

> Tried to install a module named 'Views' now. Everything was pretty much the
> same. Just came across an error which said: "
> *Fatal error*: Allowed memory size of 16777216 bytes exhausted (tried to
> allocate 70711 bytes) in */var/www/Drupal/includes/database.mysqli.inc* on
> line *303*"
>
> Tried to google a little, and found that this is because some modules
> require more memory because they provide you with a lot of functionality or
> they are poorly written. Hence, the memory limit should be increased. This
> can be done by setting the memory limit to 20M or more (it was 16M
> initially) in /sites/default/settings.php file by adding the statement
> ini_set('memory_limit','20M');
>
>
> Be sure to make changes to permissions to settings.php file after making the
> change.
>
> Regards,
> Kartik Nayak
>

How is the total memory utilization of the various modules calculated in drupal ?

thanks
Saifi.

Re: Re: Fatal Error while installing a module

by eerpini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>> Be sure to make changes to permissions to settings.php file after making the
>> change.
>>
>> Regards,
>> Kartik Nayak
>>
>
> How is the total memory utilization of the various modules calculated in drupal ?

the total memory is not as such calculated before hand, and I am not
sure there exists a method using which you can calculate the total
memory used by a php script before trying to interpret it ( correct me
if I am wrong), ...
in simple terms, the drupal core runs the php code and the interpreter
tries to allocate memory for the php code, but when this causes the
system limit on the total memory that can be used by the php virtual
machine, the error is shown.

Cheers
Satish

Re: Re: Fatal Error while installing a module

by Kartik Nayak-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

The memory is utilized for running php scripts and maybe remembering some
other changes that are not saved and to create previews.

I used a module named devel http://drupal.org/project/devel through which i
got the memory used when the pages mentioned were loaded. A screenshot of
the same is attached.

As per http://us2.php.net/manual/en/function.memory-get-usage.php the memory
usage by a PHP script can be calculated by that function.

http://drupal.org/node/198053 is an interesting link wherein Phalanx (check
the 4th entry) has developed a patch through which memory utilization by
each of the modules can be checked (check the screenshot). Havent tried
applying the patch though.

Regards,
Kartik Nayak

On Sun, Jul 5, 2009 at 1:30 PM, Satish Eerpini <eerpini@...> wrote:

> >> Be sure to make changes to permissions to settings.php file after making
> the
> >> change.
> >>
> >> Regards,
> >> Kartik Nayak
> >>
> >
> > How is the total memory utilization of the various modules calculated in
> drupal ?
>
> the total memory is not as such calculated before hand, and I am not
> sure there exists a method using which you can calculate the total
> memory used by a php script before trying to interpret it ( correct me
> if I am wrong), ...
> in simple terms, the drupal core runs the php code and the interpreter
> tries to allocate memory for the php code, but when this causes the
> system limit on the total memory that can be used by the php virtual
> machine, the error is shown.
>
> Cheers
> Satish
>
>
> ------------------------------------
>
> http://twincling.org/
> http://twitter.com/twincling
> ----------------------------------------
> Yahoo! Groups Links
>
>
>
>


[Non-text portions of this message have been removed]


Re: Fatal Error while installing a module

by Saifi Khan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 5 Jul 2009, Kartik Nayak wrote:

> Hi,
>
> The memory is utilized for running php scripts and maybe
> remembering some other changes that are not saved and to
> create previews.
>
> I used a module named devel http://drupal.org/project/devel
> through which i got the memory used when the pages mentioned
> were loaded. A screenshot of the same is attached.
>
> As per
> http://us2.php.net/manual/en/function.memory-get-usage.php the
> memory usage by a PHP script can be calculated by that
> function.
>
> http://drupal.org/node/198053 is an interesting link wherein
> Phalanx (check the 4th entry) has developed a patch through
> which memory utilization by each of the modules can be checked
> (check the screenshot). Havent tried applying the patch
> though.
>
> Regards, Kartik Nayak
>

Hi Kartik:

This is good !

i was hoping that you'd take a close look at

  . 'devel' module that support Drupal internal details for
     developers.

  . memory-get-usage() function.

We'll need this stuff to trace the details, when we need to
either optimize or debug.


thanks
Saifi.