Hi, i'm new to drupal so please bare with me, i was trying to install a modul, but when i click moduls in my admin, i get a blank white page! i then refresh the page and got the following error!!

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 41 bytes) in /hsphere/local/home/ichange/mysite.com/mypal/includes/form.inc on line 42

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 41 bytes) in /hsphere/local/home/ichange/mysite.com/mypal/includes/session.inc on line 50

Comments

profix898’s picture

Category: bug » support

This is not a bug. You server is configured with a memory limit of 16M, I guess. If you have many modules installed you may exceed this limit when you visit the modules page (search for 'white screen of death' for discussion on that).

A simple fix is to add
ini_set('memory_limit', '20M'); or larger to your site's 'settings.php' (under /sites/xxx/settings.php).

This issue is fixed in Drupal 5.

magico’s picture

Status: Active » Fixed

Closing support requests older than 1 month.

Anonymous’s picture

Status: Fixed » Closed (fixed)
astra’s picture

I got the same problem. But I fixed it by adding ini_set('memory_limit', '25M') to my site's 'settings.php' .

theemstra’s picture

Works for me!

arnieswap’s picture

Version: 4.7.4 » 6.0
arnieswap’s picture

Component: user system » base system

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 33888 bytes) in /var/www/includes/menu.inc on line 958

springnet’s picture

I ran in this problem also and hope this is fixed in the next release. I'm using a boatload of modules on a dev site.

Our server is configured with a memory limit of 16M and we have a lot of modules installed so we exceeded this limit when we visited the modules page (search for 'white screen of death' for discussion on that). A simple fix is to add

ini_set('memory_limit', '30M'); or l
to the
/var/www/drupal/sites/default/settings.php file

Ideally this would go in
/var/www/drupal/sites/all/ directory but this failed when I tried to install it there as one line in a new settings.php file.

Maybe someone could make a clarification on this issue I had?

milesenglish’s picture

Version: 6.0 » 6.9
Priority: Critical » Normal
Status: Closed (fixed) » Postponed (maintainer needs more info)

I'm experiencing the same issue when trying to get my Ubercart site working. I tried to add the ini memory line to my settings.php file but each time I save the changes I get the following message:
[a fatal error or timeout occurred while processing this directive]

I've tried adding it to several different locations within the file but I always get the same fatal error message. Any help would be greatly appreciated.

**more info - I figured out that I needed to create a php file so I did so using Bluehost's control panel. I'm not sure if it matters but the php files lives in the public_html directory and my drupal install is located in a subdomain within that directory. Anyway, i found the memory line and changed it from 36m to 96m. Logged back on to the Administration page, clicked Modules and still got the Fatal error: Allowed memory error.

So I could still use a hand! :(

ainigma32’s picture

Assigned: aktivist » Unassigned

@milesenglish: It's been a while... were you able to tackle this already?

- Arie

kgm’s picture

FWIW, I just ran into this and confirmed the reply in #9. I.e., increasing the memory limit by editing sites/default/settings.php works. But if I put the same call to ini_set() in sites//settings.php, it's ignored.

Drupal 6.9

crimsondryad’s picture

Title: Fatal error: Allowed memory size of 16777216 bytes exhausted » Fatal error: Allowed memory size of 16777216 bytes exhausted - effect on server sharing sites?
Version: 6.9 » 6.10

So I got the white screen of death and started researching workarounds. Everything I've seen says to kick up your php.ini settings, some as far as 64M. As the owner of my server hosting multiple shared sites, what kind of impact will this have on the availability of memory server wide? Especially once we start hosting multiple drupal sites? I don't think the number of modules I installed was extreme - I worked out a base set of about 10 or so and then I had about 3-4 more for that specific site.

Thoughts?

ainigma32’s picture

Title: Fatal error: Allowed memory size of 16777216 bytes exhausted - effect on server sharing sites? » How much memory does a Drupal site need?

@crimsondryad: Some modules will take up more memory than others. Either because they just offer a lot of functionality (e.g. Views) or because they are not written very well (choose your poison ;-)
Apart from the modules there is also the amount of content that can have a big impact on memory consumption. Especially using taxonomy combined with a lot of nodes will require quite a bit of memory.

Allowing all sites to use more memory will of course stress your server more, especially if all sites are processing traffic at the same time. The thing to keep in mind is that you are configuring the maximum amount of memory.
It would take some testing but I believe that the peaks in memory consumption almost always take place when someone is carrying out some administrative task.
So, as long as you can spread the admin work around a little, the chances that all sites peak at the same time will get smaller.

Theoretically you can just divide the amount of memory available (after the OS has taken it's share) and divide that by the amount of memory that you want to give to the hosted sites. That will give you the number of sites you can host on that server.
So say you have 2 GB of available memory and you want to allow the sites to use 64 MB each you can host 32 sites.

In practice I believe most hosting providers will add a few more sites because there will usually be a few that require fewer resources.
Another way to manage this is to set the amount pretty low (say 20MB) and then wait for the customers that need more to start yelling. Not an approach I would suggest but it happens.

Finally, if you are doing this for a living, I suggest you consider hiring some of the professionals specialised in performance to work with you. 2bits comes to mind (no affiliation) but I'm sure there are lots more that can assist.

Please note that I'm not a hosting guru by any means so do ask around some more (maybe the mailing lists and/or IRC)

Please post back some update when you figured this out.

- Arie

john.diegor’s picture

same error happens to me with drupal 6.11 (Allowed memory size of 16777216 bytes exhausted (tried to allocate 24576 bytes)) i set the memory limit to 30MB

theemstra’s picture

put it on 100MB

wwwoliondorcom’s picture

Hi,

I had the same problem for a 30000 nodes website, then I added this line:
ini_set('memory_limit', '100M');

and still got this error:
Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 262144 bytes) in WEBSITE/modules/taxonomy/taxonomy.module on line 648

Then I changed to: ini_set('memory_limit', '150M');
And it now works,

But I wonder what's next ?

If my website gets bigger will I have to increase this again or is there any other thing that I should do ?

Thanks a lot for your help.

vm’s picture

Status: Postponed (maintainer needs more info) » Fixed
axeos’s picture

Hi,

i have the same problems, but i solved this with statement

ini_set('memory_limit', 31457280);

in settings.php.

This is 30MB in Byte.

I hope this helpfully.

- axeos

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rafinskipg’s picture

What I'm supposed to do when the "white screen" appears?
Restart the server? Wait ??

vm’s picture

memory errors = http://drupal.org/node/76156
aid for silent WSOD = http://drupal.org/node/482956

best to create a new forum thread if you continue to have issues though memory issues is a easily found topic. ensure your server fits in drupal requirements and remember the more modules you add the more memory gets used.

theemstra’s picture

Hey,

To make this clear:

If you get this error:
Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 262144 bytes) in WEBSITE/modules/taxonomy/taxonomy.module on line 648

It tries to allocate 262144 bytes, that is 0.25 megabytes, it means you need to get at least 0,25 mb extra memory,
You can set it in your settings.php, but that is only for Drupal, your global php.ini file controls the absolute maximum.

If you' ve got shared hosting, you can ask your provider, if you run own servers (like me), VPS/Dedicated servers etc. you can change it yourself,
/etc/php5/.....php.ini (use " find . | grep php.ini" )

And look for memory_limit or things like it, read the manual.

Regards,
Thom

valerama’s picture

Perfect solution for my installation on Network Solutions! Thanks!