Zen Cart Logo
Forums / General Questions / Out of Memory error when I perform a search

Out of Memory error when I perform a search

Locked

Views: 2,342

Results 1 to 20 of 25
This thread is locked. New replies are disabled.
11 Oct 2010, 5:27 PM
#1
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Out of Memory error when I perform a search

My website is https://herbsofmexico.com/store/
When a search is performed using the zencart search in the upper right (not the google search in the left column), I receive the following error message:

5 Out of memory (Needed 8388580 bytes)
in:
[select count(distinct p.products_id) as total FROM (zen_products p LEFT JOIN zen_manufacturers m USING(manufacturers_id), zen_products_description pd, zen_categories c, zen_products_to_categories p2c ) LEFT JOIN zen_meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%gingko%' OR p.products_model LIKE '%gingko%' OR m.manufacturers_name LIKE '%gingko%' OR (mtpd.metatags_keywords LIKE '%gingko%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%gingko%' AND mtpd.metatags_description !='') OR pd.products_description LIKE '%gingko%') ))]

Is this a zencart problem or a sql problem?

What can be done to correct the problem?

Thanks!

Sean
+<|:-)

11 Oct 2010, 5:29 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

Need more information about the server you are on
http://www.zen-cart.com/forum/faq.php

11 Oct 2010, 5:31 PM
#3
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

Server Information
Server Host: doblo.websitewelcome.com (174.120.189.226) Database Host: localhost (127.0.0.1)
Server OS: Linux 2.6.34.6 Database: MySQL 5.1.50
Server Date: 10/11/2010 12:31:00 Database Date: 10/11/2010 12:31:00
Server Up Time: 12:31:00 up 23 days, 13:58, 1 user, load average: 2.03, 1.82, 2.20 HTTP Server: Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
PHP Version: 5.2.14 (Zend: 2.2.0) PHP Memory Limit: 64M PHP Safe Mode: Off
PHP File Uploads: On Max Size: 64M POST Max Size: 64M
Database Data Size: 220,270 kB Database Index Size: 3,858 kB

11 Oct 2010, 5:36 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

I believe your host allows a local php.ini file

PHP Memory Limit: 64M

Try 96M

11 Oct 2010, 5:38 PM
#5
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

I use HostGator. Do I upload a php.ini file? If so, where?

Thanks!

11 Oct 2010, 5:39 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

I use HostGator.
websitewelcome.com told me that
Do I upload a php.ini file? If so, where?
At the root of your shop

11 Oct 2010, 6:27 PM
#7
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

I created a php.ini file with the code mentioned above.
Does the file need to contain any other info?

I added that file to the store directory.

Now the entire site is down:
https://herbsofmexico.com/store/

Any help would be greatly appreciated!

Thanks,

Sean

11 Oct 2010, 6:29 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

What did you enter in the file
Using what editor

11 Oct 2010, 6:34 PM
#9
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

Good news - The site is back up.
Bad news - The search is still not working...

I use ConTEXT as my editor.
The file simply has the one line code:
PHP Memory Limit: 64M

11 Oct 2010, 6:42 PM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

Server Information
PHP Memory Limit: 64M
The file simply has the one line code:
PHP Memory Limit: 64M
Bad news - The search is still not working...
You did not change anything it was 64M before and you entered 64M

BTW the correct syntax is

memory_limit = 96M
11 Oct 2010, 7:46 PM
#11
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

I changed my php.ini file - added the line of code to read:
memory_limit = 96M

Search still doesn't work. The Server Info still reads 64M

Server Information
Server Host: doblo.websitewelcome.com (174.120.189.226) Database Host: localhost (127.0.0.1)
Server OS: Linux 2.6.34.6 Database: MySQL 5.1.50
Server Date: 10/11/2010 14:45:39 Database Date: 10/11/2010 14:45:39
Server Up Time: 14:45:39 up 23 days, 16:12, 1 user, load average: 1.86, 2.25, 2.47 HTTP Server: Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
PHP Version: 5.2.14 (Zend: 2.2.0) PHP Memory Limit: 64M PHP Safe Mode: Off
PHP File Uploads: On Max Size: 64M POST Max Size: 64M
Database Data Size: 220,308 kB Database Index Size: 3,861 kB

11 Oct 2010, 8:07 PM
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

The Server Info still reads 64M
Scroll down to the php listing

There should be 2 columns server & local

What is in local?

11 Oct 2010, 8:48 PM
#13
drbyte avatar

drbyte

Sensei

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

Re: Out of Memory error when I perform a search

Did you log a support ticket with your hosting company to ask them for the correct way to increase the memory limit for your site? They're the experts on their servers, thus best to ask them.

12 Oct 2010, 12:41 AM
#14
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

To make changes to the memory size, I needed to upgrade to a VPS account with HostGator. You can't make changes to the php.ini file any other way.

So, I'm in the process of switching over to the new VPS service.

Any idea why I received this error message today? It's worked fine on the reseller server with HostGator for the last 10 months.

12 Oct 2010, 1:04 AM
#15
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Out of Memory error when I perform a search

I'm in the process of switching over to the new VPS service.
Are you aware that you become your own server administrator?
Are you prepared to do this task?
All you receive is a basic web server setup

12 Oct 2010, 2:25 AM
#16
drbyte avatar

drbyte

Sensei

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

Re: Out of Memory error when I perform a search

TKPope:

To make changes to the memory size, I needed to upgrade to a VPS account with HostGator. You can't make changes to the php.ini file any other way.

So, I'm in the process of switching over to the new VPS service.

Any idea why I received this error message today? It's worked fine on the reseller server with HostGator for the last 10 months.

Bollocks.

I have several shared accounts with them, and never had to switch to VPS to change php.ini settings.

12 Oct 2010, 5:10 AM
#17
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

I don't know if I'm up for the task of being my own administrator, but I don't know what my options are. I made the changes that kobra suggested, but that didn't fix the problem.

Before I transfer the sites over, is there anything else I can do to fix this problem?

12 Oct 2010, 5:19 AM
#18
drbyte avatar

drbyte

Sensei

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

Re: Out of Memory error when I perform a search

When I needed to up the memory limit for PHP on those sites I simply looked up the instructions on the HG website and did it that way.

You don't need a VPS to run Zen Cart. If you had an enormous store with half a million products and several million visitors per day then it might be worth considering a VPS. Until then all you need is a tiny memory boost.

12 Oct 2010, 5:38 AM
#19
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

DrByte - I wish it was still that easy to change the php.ini file with HostGator on reseller accounts, but it is not - http://support.hostgator.com/articles/cpanel/php-settings-that-cannot-be-changed

From the Above article:

PHP settings that cannot be changed

PHP has been configured to use the following settings on our shared and reseller servers:
safe mode = off
memory_limit = 64M MAXIMUM
max_execution_time = 30 MAXIMUM
post_max_size = 64M MAXIMUM
upload_max_filesize = 64M MAXIMUM
enable_dl = Off

12 Oct 2010, 5:39 AM
#20
tkpope avatar

tkpope

New Zenner

Join Date:
Jul 2009
Posts:
37
Plugin Contributions:
0

Re: Out of Memory error when I perform a search

Any thoughts as to why the memory on this site suddenly became a problem after 10 months? Maybe I can fix THAT instead of doing this lengthy work around.