1
votes

I'm going to lay this out as simply as I can while still telling all pertinent details. I'll list site details below:

http:///www.bubblegenius.com (front page currently locked off) You can access the site inside and see exactly what's happening by going to http://www.bubblegenius.com/soap.html.

A client of mine ran a Magento-run ecommerce store on a shared host. After successfully running the store there for a few months, she started experiencing what seemed to be memory issues. The site would occasionally stop working or produce "fatal errors" when adding items to the cart.

When clicking Add to Cart the screen would go white--blank--without any warning error. When I turned on error checking in the index.php file, and tried to add a product to the cart, I received the following:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 62914560 bytes) in /home/bubblege/public_html/app/code/core/Mage/Core/Model/Session/Abstract.php on line 234

I've tried upping php memory to 128M, 512M, even 2048M inside php.ini, .htaccess, and even setting it in index.php with

ini_set('memory_limi', '2048M');

Upping the memory limit to 512 or above doesn't produce the above Fatal Error, but won't allow any item to be added to the cart. It produces the following message:

"The item cannot be added to the cart."

Now here's the kicker: We moved my client over to a VPS running 768MB Guaranteed (w\ 1.5GB Burst RAM), and I worked extensively with the server techs to optimize the server.

However, since moving to the VPS, the errors have continued. The site works fine until you try to add an item to the shopping cart.

I've searched every magento message board looking for a solution to this bug. I've disabled all extensions, and even tried installing from a new version of Magento and from a previous version.

I've done database repairs, optimization, did a compare and fix with a clean database running a clean version of Magento.

As of now, I'm authorized to offer up to two hundred dollars to find someone who can fix this issue once and for all. If you have any insights and answers to this, and think you can fix this, please contact me either here or directly. I can provide server access details and would be able to walk through any questions and possible solutions with you.

Also, my background is not really server-admin centric but I know my way around a box, and I've been working with Magento for a few years. Several of my other clients are running sites without issue.

2
I hate to point this out because you've probably already checked it, but did you put the memory limits in the php5.ini file as well? Are you running WHM on the VPS? That could override it as well.Nic
I am running WHM, but I have, as mentioned, specifically updated all the settings for php, apache, and mysql to run at peak. Yes, php5.ini is also set.f8xmulder

2 Answers

0
votes

Have you tried running the same code and database on a local computer of yours? That's a good start. If the problem does not persist, there's an environment issue at play. If the issue does persist, try running the same database against a fresh copy of Magento (code straight from the repo, basically). If the problem subsides, you probably have a code issue. If not, database is likely to blame.

Next, add a new product type and a new product. Try to add those to the cart. Use a new customer, etc.

Debugging after that depends on the issues you found, but somewhere in the Magento logic you are getting tripped up. I'm guessing that it is the database, since Magento depends on several things existing in the database correctly. Stepping through the code with a debugger may show you where it bails from the process.

Let us know how that goes. :)

0
votes

I just encountered this issue as well. The solution was to turn PHP Safe Mode OFF. That immediately corrected the issue for me.