10 replies [Last post]
harlem's picture
Offline
Joined: 12/17/2008
Juice: 11
Was this information Helpful?

Hello, I am trying to get a site up an running with drupal and ubercart but keep getting out of memory errors. So, I researched this and found that I could up the php memoroy limit to whatever i wanted (in this case 128M!!) by adding a php.ini file to the directory of my drupal install and the php info shows that did increase. Also, taking the advice of others, I enabled modules one by one. I can get the core programs to enable and perhaps one or two other option, but anymore than that i get the WSOD - out of memory error. Am I missing something?

I am running on 1and1 shared hosting using their business package which is quite large with lots of flexibility. Also, the default Drupal 6 php memory limit is 40M which is plenty as this is what is running on my other drupal site with a lot of modules.

Is there something I am missing? Maybe another setting I need to customize? Any help would be appreciated:)

Thanks in advance

Harlem

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Increased php memory to 128M still get wsod

The WSOD could be caused by something else, like a PHP error or something. The memory limit is just the most common issue. Check your Apache error_log to see if it's showing any PHP errors when you get the WSOD.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
You can also add <?php 

You can also add

<?php
  error_reporting
(E_ALL);
 
ini_set('display_errors', TRUE);
 
ini_set('display_startup_errors', TRUE);
?>

to your index.php file, and that will show you all of the fatal errors on which PHP will stop.

--
Help directly fund development: Donate via PayPal!

harlem's picture
Offline
Joined: 12/17/2008
Juice: 11
Ok

I'll try and reproduce it and see what I get. thanks for the quick replies:)

harlem's picture
Offline
Joined: 12/17/2008
Juice: 11
fatal error

Here is the on screen error message

Fatal error: Out of memory (allocated 33292288) (tried to allocate 976704 bytes) in /homepages/11/d191481066/htdocs/hipeli/includes/database.mysql-common.inc on line 41

I added the code to my index.php file but I am not sure it worked as this is the typical message that I have been getting. Either way I will look further into it. Just to be safe, I am using Drupal 6 and I added the php code mentioned above to the index.php just before the "drupal_page_footer ();" code.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: fatal error

Yeah.. something is wonky. Eye-wink

That's not normal behavior... looks like something is stuck in an infinite loop until PHP runs out of memory. What other modules are you using on the site?

harlem's picture
Offline
Joined: 12/17/2008
Juice: 11
Modules

Here is a list

admin_menu
backup_migrate
cck
dhtml_menu
emfield
fckeditor
filefield
image
imageapi
imagecache
imagefield
img_assist
link
mollom
panels
pathauto
poormanscron
service_links
slider
thickbox
token
views
and of course trying to use ubercart

qrios's picture
Offline
Cool profile pic award.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 554
Re: Modules

Ive had issues like this before, this is probably not Ubercart related.

Try to replicate this in an isolated environment (you as only user) with devel module enabled to track SQL queries.
The errormessage says nothing much about the cause, any module can call database functions in common.inc.

You say you can enable only a few modules, check which one. If it is views, please check which view is triggering this error. Try to narrow it down, it must be caused somewhere.

Double check custom code (if any) containing SQL queries.

By the way add this http://www.ubercart.org/forum/support/8090/increased_php_memory_128m_sti...
code to the very top of your index.php

vince.rowe's picture
Offline
Joined: 06/23/2008
Juice: 67
1and1

I would also double check what memory is actually being allocated to you, as I have read in the 1and1 FAQ system:
"Due to resource limits on our Shared Hosting machines, it is not possible to allocate more than 20M
of memory to PHP, although phpinfo() may report a higher number.
"
http://faq.1and1.com/scripting_languages_supported/php/16.html

But have also read that it is possible by creating a php.ini file and using:

register_globals=off
memory_limit = 128M ; Maximum amount of memory a script may consume (8MB)

http://drupal.org/node/66327#comment-774712

The reason I bring this up is that the error message you first showed is spitting out an error on just under 32MB which is probably the default you have been given.

Hope some of this helps.

Vince

harlem's picture
Offline
Joined: 12/17/2008
Juice: 11
Re: Increased php memory to 128M still get wsod

Yup, I saw those as well. One says that it is not possible and the other says that it is, not sure what to make of that, either it is or it isn't:( I suspect that this is not ubercarts fault as the same memory error happens when using developers module (why me). Perhaps this is a question for the drupal forums. Thanks for the help folks.

chrisroge's picture
Offline
Joined: 12/29/2008
Juice: 12
working for me now

I upped the mem limit to 128M and turned register globals on and this error is now gone.

This error had started for me after building a new server, apparently I just forgot to up the mem limit and turn on globals.