Pconnect function and website

I have two separate websites running CS-Cart, using the same host. Ever since I brought the second one up live, the websites have been having trouble.

Now the host’s tech support tells me this is the reason:



The shopping cart is causing problems on the database server and the server you are on . It is causing the server to overload.

mirroro_cscart is a reason for the problems! check /root/1

plz tell client do not use pconnect function!



That is the database for my first website. What is pconnect function? and can I do without it?

PHP function “mysql_pconnect” when used in php scripts for database connections opens a persistent connection to a MySQL server and if it is enabled on a shared server then, clients can use it to establish MySQL persistent connections to MySQL server which in turn will consume excessive server CPU resources and also overload the MySQL server which finally can affect adversely on the overall performance of MySQL service.



I don’t know if CS-Cart uses “mysql_pconnect” instead of “mysql_connect”, but the issue seems to be very curious.

yes, and I’m afraid that my website host is about to kick me because they say this is causing daily database problems for the entire server.

Are your sites busy? What is your monthly traffic?

Right now both sites have minimal traffic. I’ve never been able to get MirrorofTime.com to rank well. And TheSteelsource.com was recently converted from an HTML site to a cs-cart site. So all the incoming links and bookmarks aren’t valid unless for the home page. we lost almost all the traffic. Hope it’s only temporary. But the site constantly going down due to this pconnect problem surely doesn’t help.

pconnect is not used within standard CS-Cart coding.



Have you have any additional coding done or installed any add-ons to that store?

Not any outside add-ons. Only what is available through the cs-cart itself. i.e. SEO, Gift Registry, Comments and Reviews, etc.

There is one or two cart updates I could do. Do you think that would help? I just hesitate to install upgrades because they usually break something and cause problems.

Then they don’t know what are they talking about. In short, sure, CS-Cart and each other script like forums etc. are more database intensiv (db queries) as a simple html site. They shared servers might be overselled and so scripts like CS-Cart will cause a CPU overload. A simply answer is they don’t want to run to much so scripts on their shared servers or they want that you do an upgrade to a higher hosting package.

now the host technical support is saying its BOTH databases that are causing the problem. So two different installations (on the same server). and two different versions of cs-cart.



Which makes sense, because when just the one site was live, didn’t see a problem. But when the second site went live, that’s when the problems started. Two sites doing whatever-it-is that’s causing it was just too much for the server.

[quote name=‘mirroroftime’]now the host technical support is saying its BOTH databases that are causing the problem. So two different installations (on the same server). and two different versions of cs-cart.



Which makes sense, because when just the one site was live, didn’t see a problem. But when the second site went live, that’s when the problems started. Two sites doing whatever-it-is that’s causing it was just too much for the server.[/quote]

No way, would they want to say that an another customer can’t run for example a CS-Cart 1.3.5 on the same server as you are on???

Then your host is wrong about the persistent connection being caused by your coding.



It sounds to me like they don’t have the MySQL server properly optimized or that server may be overloaded.



I wouldn’t attempt upgrading until this issue is resolved one way or another because you certainly don’t want them to pull the plug during the upgrade. That may happen because of the huge queries involved with some of those.



You might try clearing your stats if using the Statistics addon and then running repair and optimize tables on that database causing the problems to see if that helps.



You will have to work with your host to see if this has helped or not

I would like to try that. How do I clear the Stats? and is the repair/optimize tables in cs-cart or directly in the database?



Thank you.

[quote name=‘mirroroftime’]I would like to try that. How do I clear the Stats? and is the repair/optimize tables in cs-cart or directly in the database?



Thank you.[/quote]

  1. Administration > Statistics > Remove statistics
  2. Administration > Database > Maintenance

thank you so much. I just did that for both sites, so we’ll see…

You might also mention to your host that your DNS records need repaired



Link to screen shot (large Image)



For some reason they have it setup for your domain to be using 3 name servers but since they all reside on the same server it makes no sense.



They are also open DNS servers and that isn’t good. You will most likely fail some PCI compliance testing.

I just sent your message on to them. That was an interesting report. Thanks.