Forums / General Questions / Optimizing database to avoid hitting memory limits?

Optimizing database to avoid hitting memory limits?

Started by laurelsstitchery on 28 Dec 2012, 10:07 PM · Views: 1,294

Results 1 to 6 of 6
28 Dec 2012, 10:07 PM
#1
laurelsstitchery avatar

laurelsstitchery

Zen Follower

Join Date:
Jun 2010
Posts:
145
Plugin Contributions:
0

Optimizing database to avoid hitting memory limits?

I'm using version 1.5.1. When I login to admin and try to go to Categories/Products, I get either a 500 internal server error or it just sits and sits and never loads. Dreamhost says I'm hitting my memory limit. Coincidentally (or not) they moved me to a new server yesterday and the problem started then. They've basically refused to help me in any way. I don't know where to start other than trying to optimize my database and I can't find any instructions on how to accomplish that. I'm at the end of my rope with these problems and I don't know what else to do. I can't access my catalog until I get this fixed. Could someone please help me.

28 Dec 2012, 10:12 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Optimizing database to avoid hitting memory limits?

PHP memory limits are not related to database optimization.

Your PHP memory limit is the amount of RAM allocated by the server's administrator to any PHP script.

Chances are that the new server they put you on has less RAM available to PHP because they've either not tuned it to use more than the (very low) defaults set up by a new(or upgraded) PHP installation, or they're intentionally limiting users on your particular hosting plan. Either way they should increase the limit to something reasonable. Especially when, as you say, the problem did not exist before they moved you to a different server.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Dec 2012, 10:39 PM
#3
laurelsstitchery avatar

laurelsstitchery

Zen Follower

Join Date:
Jun 2010
Posts:
145
Plugin Contributions:
0

Re: Optimizing database to avoid hitting memory limits?

Thanks for the reply, Dr. Byte. I'm on yet another live chat with them and I think the guy who is helping me understands my problem and is helping. :) Should be fixed finally here in a few minutes. Thanks!

29 Dec 2012, 2:43 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Optimizing database to avoid hitting memory limits?

Dream Hosts should really change their name to Nightmare Hosts. I have found them to be totally useless for eCommerce hosting.

20 years a Zencart User

29 Dec 2012, 4:07 PM
#5
laurelsstitchery avatar

laurelsstitchery

Zen Follower

Join Date:
Jun 2010
Posts:
145
Plugin Contributions:
0

Re: Optimizing database to avoid hitting memory limits?

DrByte:

PHP memory limits are not related to database optimization.

Your PHP memory limit is the amount of RAM allocated by the server's administrator to any PHP script.

Chances are that the new server they put you on has less RAM available to PHP because they've either not tuned it to use more than the (very low) defaults set up by a new(or upgraded) PHP installation, or they're intentionally limiting users on your particular hosting plan. Either way they should increase the limit to something reasonable. Especially when, as you say, the problem did not exist before they moved you to a different server.

Dr. Byte - what would be a reasonable memory limit in your opinion? I checked my stats and it's showing I'm using 397mb of cached memory and 472mb of actual memory for a total of 869mb. Is that normal?

29 Dec 2012, 5:40 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Optimizing database to avoid hitting memory limits?

I'm not sure what you're looking at to get those numbers.

But a PHP memory_limit setting of 256M should be very reasonable.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.