Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes)

Posts: 2
Joined: 02/06/2008

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 11520 bytes)

What does that mean? I'm not a programmer, just a designer. Could someone please help me? I'm using a 1&1 Server. It's not Windows, the other one. It's not dedicated either, if it makes a difference. And also, I'm not close to the maximum allowed space and I'm not having any problems with bandwidth or anything like this.

Posts: 30
Joined: 01/30/2008

Oh! I know how to solve this one! Smiling

You'll need to adjust a PHP.ini setting. Ask your hosting provider where you need to edit PHP.ini settings. Their FAQ on their website could be a good place to start. Either you'll need to put the specific setting in a php.ini file, or in a .htaccess file. These will be in the root of the folder where your website is (probably public_html). The .htaccess file will already be there because of a Drupal installation (if you installed Drupal in that folder). Anyway, you'll need to add:

memory_limit = 12M if your host said you need to add it to a php.ini file.

(You'll need to create this file and upload it to your server via FTP since you're on shared hosting. You can make a text document on Windows and rename it to php.ini. If you create the text document and it does not have a file extension (like .txt at the end) you'll need to show file extensions.)
- OR -

php_value memory_limit 12M if your host said you need to add it to a .htaccess file

Good luck!

Posts: 891
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I'll add this to the FAQs. I think a limit of 16M is more likely, and you might even need to set it higher (24M or 32M) if you keep having problems. Best to try enabling a few modules at a time, so they don't all try to grab memory at once.

--

<tr>.

Posts: 332
Joined: 08/07/2007
Administrator

The devel module has setting where you can see how much memory PHP is using for page loads. Right now the UberInstaller doesn't do any checking how much memory PHP is allowed to used. When I start work on UberInstaller 2 in the near future I'll be adding a check for memory_limit. I think I'm going to try out a test install and enable the minimum amount of modules and the maximum amount of modules to get a low to high end amount of memory that you'll need for Ubercart.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Posts: 332
Joined: 08/07/2007
Administrator

Okay, TR it looks like you're figures were pretty accurate. Here's my findings:

Minimum:

Contrib Modules: CCK: Content,CCK: Image,Devel,TAPIr,Google Analytics,Imagecache,Token,uBrowser,Workflow-NG
Drupal Core: Color,Help,Menu,Path,Taxonomy,Block,Filter,Node,System,User,Watchdog
Ubercart: Cart,Order,Product,Store,Product
Memory at devel_shutdown(): 12.04 MB

All Ubercart Modules (using beta 4):

Contrib Modules/Drupal Core: Same
Ubercart: All Modules
Memory at devel_shutdown(): 17.6 MB

All Ubercart Modules & Drupal Modules:

Contrib Modules: Same
Drupal Core/Ubercart: All Modules
Memory at devel_shutdown(): 20.88 MB

Not including other contrib modules people will want to use, I'd say those figures would be pretty good to use for the FAQ.

--

-Shawn Conn: If the Name Don't Rhyme It Ain't Mine

Posts: 3
Joined: 12/14/2007

FYI: I ran a Drupal patch (http://2bits.com/articles/measuring-memory-consumption-by-drupal-bootstr...) that ranks modules by memory use, on a site I'm working on that is suffering from having too big of a memory footprint. Here are the top results on the front page, which does not use anything from ubercart directly:

Start,61672
End,47397932
Total,47336260
uc_order,1802728
uc_store,1221108
user,1115516
uc_cart,1067692
node,1020940
uc_product,870952
system,855588
views_ui,813980
nodequeue,635556
comment,597660
views,567336

It'd be nice if ubercart could reduce the memory footprint of uc_order and uc_store especially.

Posts: 4747
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Those modules are huge, but we'll be piecing them apart come D6. I expect to see huge memory improvements once we have smart page loads/includes.