Forums / Installing on a Linux/Unix Server / 5 Out of memory - increased PHP Limit, still error persists

5 Out of memory - increased PHP Limit, still error persists

Started by dmon_ng2 on 9 Dec 2010, 1:44 PM · Views: 2,207

Results 1 to 9 of 9
9 Dec 2010, 1:44 PM
#1
dmon_ng2 avatar

dmon_ng2

New Zenner

Join Date:
Nov 2008
Posts:
13
Plugin Contributions:
0

5 Out of memory - increased PHP Limit, still error persists

Hi guys,

Every now and then (becoming more and more frequent) when browsing my website I get the following:

5 Out of memory (Needed 2095128 bytes)
in:
[select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from zen_banners b, zen_banners_history bh where b.status = 1 and b.banners_id = bh.banners_id group by b.banners_id, b.expires_date, b.expires_impressions]

This error has been happening over the past week but no new mods or anything like that have been installed.

I had a quick scan of the forum and read that perhaps increasing my PHP Memory Limit would help, so I contacted my host and had it increased to the max, 64mb.

This has not resolved the problem, and I desperately seek advice on how I can fix it. Im running and upgraded 1.3.9d of Zen Cart.
PHP Version: 5.2.14 (Zend: 2.2.0)
MySQL 5.1.52

You can view my website at: http://tinyurl.com/36wbvuq

I really hope you guys can help get me back up to full speed.

best wishes,
DMon

9 Dec 2010, 2:39 PM
#2
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

Until you can find a solution to the problem you need to remove the rotating banner from the homepage. This is what is causing the error and it is making the site non-functional.

Sales are the most important thing, especially at this time of year - so lose the banner. Deal with the problem later.

Vger

9 Dec 2010, 2:47 PM
#3
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

Possible causes:

  1. MySQL on the server is completely overloaded, and so it can't run the query that activates the banner.

  2. Apache processes are overloaded on the server, so it cannot activate the banner.

  3. There may be a DOS or DDOS attack against the server, preventing it from functioing properly.

  4. You may have spammers/hackers bombarding your site and trying to break in, thus using up available resources allocated to your hosting.

  5. A malformed script may be causing the problem - but as it loaded the first time I visited and only failed when I hit "Refresh" I don't think this is the problem.

Vger

9 Dec 2010, 3:01 PM
#4
dmon_ng2 avatar

dmon_ng2

New Zenner

Join Date:
Nov 2008
Posts:
13
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

Thanks for your advice Vger - it's much appreciated.

I will have to look into disabling the banners - but it's confusing because we've had the banner system running for over 7 months and have never experienced any problems until about a week ago. Nothing new has been installed.

Also, I have just logged into the Zen Cart Administration and immediately been presented with the following:

5 Out of memory (Needed 2095128 bytes)
in:
[select c.customers_id as customers_id, c.customers_firstname as customers_firstname, c.customers_lastname as customers_lastname, a.customers_info_date_account_created as customers_info_date_account_created, a.customers_info_id from zen_customers c left join zen_customers_info a on c.customers_id = a.customers_info_id order by a.customers_info_date_account_created DESC limit 5]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

This is the first time this has happened - I'm starting to panic.

I just can't figure out what's suddenly gone wrong with my website.

Can you offer any further advice buddy?

9 Dec 2010, 3:07 PM
#5
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

It doesn't matter how much Memory your hosts allocate to your site if the server is overloaded (just too many sites) or overstressed (under attack of some kind).

This is the busiest time of the year, and so my guess is that the server just isn't up to the peak loads it is now experiencing. It may function okay when sites are relatively inactive but just totally overloaded during this peak trading season.

I don't know who you are hosted with, but if you went with a bucket hosting company (pile-em-high, sell-em-cheap) then that's most likely your answer.

Vger

9 Dec 2010, 3:12 PM
#6
dmon_ng2 avatar

dmon_ng2

New Zenner

Join Date:
Nov 2008
Posts:
13
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

:( we're with Hostgator

I'm going to have to chat to them to see what can be done about it I guess. Support wise those guys are great, hopefully they will be able to do something about it.

Thanks for your help Vgor!

9 Dec 2010, 3:24 PM
#7
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

we're with Hostgator

Then, I'm afraid, to coin a saying "You are the author of your own misfortune".

You may be able to get them to transfer your site to a new server which they haven't yet stuffed full of sites. This will involve downtime, and will only be a temporary solution (because they will stuff it full of sites in time).

Best advice - move hosting before the next peak trading season.

Vger

9 Dec 2010, 8:56 PM
#8
dmon_ng2 avatar

dmon_ng2

New Zenner

Join Date:
Nov 2008
Posts:
13
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

After speaking with my host, they have advised that the best course of action would be upgrading my hosting to VPS.

Because their shared hosting has a php memory limit of 64mb, upgrading to a VPS will release the cap on the php memory limit.

Does that sound about right?

9 Dec 2010, 11:17 PM
#9
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: 5 Out of memory - increased PHP Limit, still error persists

No, it sounds like total nonsense. A PHP memory limit of 64 Mbs would be fine to run a Zen Cart site - if the server wasn't packed to the gills with other websites.

They're just trying to upsell you to VPS. Just ask them to put your site on a server which isn't overcrowded, or move elsewhere.

Vger