Forums / Installing on a Linux/Unix Server / Zen Cart Not Closing DB Connections URGENT HELP

Zen Cart Not Closing DB Connections URGENT HELP

Locked

Views: 1,826

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
18 Dec 2006, 10:52 PM
#1
coastalfog avatar

coastalfog

New Zenner

Join Date:
Oct 2005
Posts:
56
Plugin Contributions:
0

Zen Cart Not Closing DB Connections URGENT HELP

I've installed zen cart dozens of times and I now have an installation that keeps hanging my DB up.

When calling the ISP they are telling me that Zen Cart is keeping to many open queries and not closing the connections causing the mysql db to time out which is really frustrating me as well as my client.

I'm hoping someone here can tell me how to easily solve this issue.

It is the latest version of Zen if that helps.

Please Help.

Thanks,
Cris...

18 Dec 2006, 10:57 PM
#2
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Zen Cart Not Closing DB Connections URGENT HELP

In your includes/application_bottom.php file, if you

replace:

// $db->close();

with:

$db->close();

does it correct the problem ?

18 Dec 2006, 11:13 PM
#3
coastalfog avatar

coastalfog

New Zenner

Join Date:
Oct 2005
Posts:
56
Plugin Contributions:
0

Re: Zen Cart Not Closing DB Connections URGENT HELP

Thanks if i can ever get my isp on the phone to have them re establish my database connection i'll let you know if this solved my problem ;-)

Cris...

19 Dec 2006, 12:29 AM
#4
coastalfog avatar

coastalfog

New Zenner

Join Date:
Oct 2005
Posts:
56
Plugin Contributions:
0

Re: Zen Cart Not Closing DB Connections URGENT HELP

ok when i change that code i get the following code at the bottom of each zen cart page

in:
[select count(*) as total from zensessions where sesskey = '7ef07dedd21730a769cff520084edc0d']

anyway to get rid of that?

Cris...

19 Dec 2006, 12:35 AM
#5
vger avatar

vger

Past Contributor

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

Re: Zen Cart Not Closing DB Connections URGENT HELP

Make sure that you did not enable persistent connections when you set up Zen Cart. This is what you should see in both configure.php files:
define('USE_PCONNECT', 'false');

If it says 'true' then that could be the source of your problem.

Vger

19 Dec 2006, 12:39 AM
#6
coastalfog avatar

coastalfog

New Zenner

Join Date:
Oct 2005
Posts:
56
Plugin Contributions:
0

Re: Zen Cart Not Closing DB Connections URGENT HELP

Hey Vger,
They are both set to FALSE.

Any other ideas?

Cris...

19 Dec 2006, 12:59 AM
#7
vger avatar

vger

Past Contributor

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

Re: Zen Cart Not Closing DB Connections URGENT HELP

If those settings are both set to 'false' then it's likely a hosting issue. Some hosts who have over-stuffed their servers get onto people running dynamic sites and tell them that they are using up too many resources on the server and need to take action to reduce their usage or else fork out for a dedicated server. 1and1 does this but so do others.

However, even on the best of shared servers, if it is a very busy website (100 customers at a time online, or more) then the problem can simply be that you keep hitting max sql parent and child queries limits, in which case things will either time out or slow down. In this case you would need either a Virtual Dedicated Server or a full Dedicated Server.

Vger