By vmlsd on
i got the following error when i tried to switch the lang of my site
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 227682 bytes) in /srv/www/htdocs/open/modules/locale/locale.module on line 234
what is wrong with this?
Comments
Your overuse your PHP
Your overuse your PHP memory.
To fix it: http://drupal.org/node/29268
José San Martin
http://www.chuva-inc.com/
the error persists after i
the error persists after i configure the memory limit to 12M as recommended.
Fatal error: Allowed memory size of 12582912 bytes exhausted (tried to allocate 210969 bytes) in /srv/www/htdocs/open/modules/locale/locale.module on line 234
Look at the numbers
You are trying to allocate more than 12M (in your first case, MUCH more).
By putting in 12M you were actually lowering your memory limit.
--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal
sorry i dont quite
sorry i dont quite understand this. you said i was trying to allocate more than 12M and then you said i was lowering the memory limit by putting 12M. from the error msg, i see that the locale module only allocates around 200KB. why the memory is exhausted? and why use more memory is not good? thank you.
The numbers
In your first error message:
You have exhausted 32M of memory - this is what your previous limit would've been. You are trying to add an extra 200k on top of the 32M.
And then after you'd set your limit to 12M:
Here you've exhausted 12M and are trying to add another 200k.
So your original limit was 32M, and you set it to 12M and it got exhausted earlier. That is what I meant by lowering it.
You'll need to set the limit higher than 32M to actually increase it beyond what you had it set at originally. 32M already seems very high to me though - but I don't use the locale module.
The recommendation to set it at 12M was written when PHP came with a limit of 8M by default, and was intended for people going over 8M. Most of the time my site uses about 6M per request, but I've just upgraded to PHP5 - I haven't checked what it uses after the upgrade though.
--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal
right now my memory limit is
right now my memory limit is 12M, so I need set the limit higher than 12M, and if the problem persists, i need to continue increasing limit. is that right?
Yeah
but chances are that you will need to go above 32M since that was the limit you were originally hitting.
--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal
What modules are you using
What modules are you using to make this site so heavy?
If you set you memory limit to a high number, you site may become slower. Perhaps you should disable a few modules...
Regard,
José San Martin
José San Martin
http://www.chuva-inc.com/
how can i reset this so it
how can i reset this so it returns back to its original state? i mean the 32M limit originally set.
this problem occurred when i switch my site language from English to Khmer. so it could be because of the locale module and i18n module.
Try memory_limit = 64M
When modifying your php.ini to solve this problem, try this value first:
memory_limit = 64M
If you still get the error "Fatal error: Allowed memory size of X bytes exhausted" you will need more memory like:
memory_limit = 128M
If, however, you have set your limit to 64M and the fatal memory error does not show, you can try lowering it down like:
memory_limit = 32M
If you still don't get the error, try lowering the memory_limit further. The idea is to have the least amount of memory_limit specification possible as long as you don't get fatal memory errors.
I have experienced, from using CCK with more than a hundred custom fields over a handful of content types, that a memory_limit of 16M is not enough. This happens in my case - so it actually happens. It depends on the requirements prepared by Drupal for your PHP outputs.