Fatal error: Allowed memory Size

Joined: 12/08/2008
User offline. Last seen 2 years 10 weeks ago.

I recently moved my server from Fedora Core to Ubuntu. When I moved over a drupal site, I started getting the memory size error. I increased the memory setting in php.ini to 32M and in the drupal settings file as well, but I still get the error. It usually comes from "sites/all/modules/views/includes/admin.inc" Currently I cant even load my module page.

any ideas?

-Jamie

"Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30720 bytes) in /home/***/***/www/public_html/sites/all/modules/views/includes/admin.inc on line 2547"

Joined: 12/16/2007
User offline. Last seen 27 weeks 6 days ago.
33554432 bytes

That's 34 MB roughly, the "tried to allocate 30720 bytes" is telling you it's coming up about 3 MBs short. Try upping the memory limit to 64 MB, or even 96 MB (that's what I use). I frequently need more than 32 MB when using views and cck for custom stuff.

Blessings,
Tony

Joined: 12/08/2008
User offline. Last seen 2 years 10 weeks ago.
ok, ill try that. I was

ok, ill try that. I was trying to avoid just cranking up the memory, it doesn't seem very efficient. But I will give it a go.

-jamie

Joined: 12/16/2007
User offline. Last seen 27 weeks 6 days ago.
There are ways to cut it down...

... but I wouldn't bother on a development server. You can check into the caching stuff for a production environment.

Blessings,
Tony

G&G Podcast Host
Matt Farina's picture
Joined: 06/01/2006
User offline. Last seen 21 weeks 6 days ago.
Some memory things to know...

If you have a production server and you're concerned about memory use an opcode cache like APC. Much of the memory used to render your page comes in converting the source code to machine code. An opcode cache caches the opcodes so they can be reused. It provides a speed boost as well.

Also, you need a bit of memory for some tasks, like image manipulation. This has to do with the nature of working with images and the memory used to do those things.

Oh, and if you have a lot of modules they can take up a lot of memory. Drupal 7 should be better at this but the more features you add the more memory they require.

Matt Farina
Geeks and God Former Co-Host
www.mattfarina.com