Community & Support

Fatal error: Allowed memory size of 8388608 bytes exhausted...

I just installed 4.5.0 CVS. I get this message when I go to admin/modules.

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3840 bytes) in /home/danzeth/www/www/modules/throttle.module on line 23

What do I do about this? O_o Thanks in advance.

Comments

And now, instead of the above

And now, instead of the above, it says:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in /home/danzeth/www/www/modules/project/mail.inc on line 243

are you using php Accelerator

If you are using PHP Accelerator, check following URL
http://phpa.phorum.org/read.php?f=2&i=1037&t=1037

PHP configuration setting...

Your PHP is configured to only allow 8 MB of memory per PHP page, which somehow seems to be not enough. If you use your own server, you can edit your php.ini and increase the value of the memory_limit variable, that should fix the problem.

But this memory exhaustion shouldn't happen in the first place, might be a bug (memory-leak?) in Drupal...

HTH, Uwe.
--
My Drupal site: http://www.crazy-hacks.org
Soon to be drupalized: http://www.unmaintained-free-software.org

Thanks, I increased the limit

Thanks, I increased the limit to 10 MB in php.ini and that fixed it. I don't know much about these things but isn't 8 MB quite a bit?

The admin/modules page loads

The admin/modules page loads *every* module. Every other page only loads the enabled modules.

I think that if we'd split up

I think that if we'd split up the modules in .module and .inc files we could avoid this problem to some degree.

--
If you have troubles with a particular contrib project, please consider to file a support request. Thanks.

I cannot change apache/php settings...

I just had this problem precisely just after uploading a lot of new modules I wanted to test, when I tried to browse /admin/modules/

I am on a collocationg server, and I can't change php/apache settings.

What else could I do, short of deleting all new modules?

You mentionned a memory leak? Should this be reported as a bug?

B.

--
http://www.reuniting.info/
Healing with Sexual Relationships.

Solution when your host won't cooperate

I found the solution from another site (deanspace)
add the following line to .htaccess at the root of the drupal installation:

php_value memory_limit 16M

It works for me, even though the admin/modules page loads a bit slowly...

Still, is it normal that it uses so much memory. Should it still be considered a bug?

B.

--
http://www.reuniting.info/
Healing with Sexual Relationships.

Thank You

worked on this for about 6 hrs. I was getting no errors, output to the page was just ending.

php_value memory_limit 16M fix the issue for me also.

Sam Keen

Thanks so much for sharing

Thanks so much for sharing that modification to the .htaccess file. It saved me tons of grief.

After making change in /etc/php.ini what then?

I had the same problem and then kicked up my allocation to 24M My script is failing at the same point.

What needs to be done to get the program/process to reread /etc/php.ini ?

restatement of question: does one have to refresh (or start/stop) the web server for this to take effect?

AFAIK yes. Do something like

AFAIK yes. Do something like this:

/etc/init.d/apache restart

That should do the trick.

Uwe.
--
My Drupal site: http://www.crazy-hacks.org
Soon to be drupalized: http://www.unmaintained-free-software.org

Making drupal less memory hungry.

beside the tip given above, here is a patch to avoid this kind of problem in the future:

http://drupal.org/node/34694
http://drupal.org/node/35657

--
http://www.reuniting.info/
Healing with Sexual Relationships.

nobody click here