Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EMERGENCY HELP NEEDED!


Jason Hilton

Recommended Posts

Posted

ok, guys.

 

Today out of this blue this happened:

"Warning: mysql_connect(): Too many connections in /home/content/j/a/s/jasonhilton/html/catalog/includes/functions/database.php on line 19
Unable to connect to database server!"

 

My site: www.skyboxcards.com has been up fine for a month, now today. That /\

 

I called my host (go daddy), they said its a problem with my code. I said it was their database server, since I havent tampered with the store/code and it had been working perfect for weeks.

 

Can anyone help ASAP???

Posted

Each webhost has a maximum number of concurrent connections that they will allow. Looks like you exceeded it. Check your Eror Log. It should tell you if you reached and exceeded maximum number of connections. Hope this helps - Vger

Posted

well, its back up, but I think it is definitely go daddy.

 

It has done this randomly a few times, and when it does do it, its out for a good 30 min to 1 hour. Anyone know how to fix this?

Posted

Look in your ftp folders for the Error Log, it should be in there somewhere. It's not possible for me to tell you where, because it's location is different with each hosting company. Hope this helps - Vger

Posted

Easy solution: Move to a real host.

 

Godaddy is my registrar of choice but I wouldn't host a site there if they put a gun to my head. ;)

Posted

I am having the same problem. My max connections are set to 500 but the connection timeout is set to 8 hours and my host (fatcow) won't change it. I am going to try to turn off persistent connections and see if that works. Hope this helps.

Posted

yes, it is time to change hosts if you are having that error. else your site is going to be randomly playing the role in the movie 'Deer Hunter', whereby they put a bullet in the pistol, point it to your head and pull the trigger (you pulling the trigger yourself) and it gets passed around until it fires, (in this case the server dies).

 

on another note phethan, it is against forum rules to have in your signature a web site other than one pointing to somewhere here on the osCommerce site. your company link belongs via the profile to link to the www button.

Posted

you should call up godaddy and talk to a manager. this is an easy fix and they should do it for you. if they dont, i would switch servers.

Posted

would getting my host to reduce the wait timeout setting fix the problem? i tried turning off persistent connection but it seemed to worsen the problem. any other thoughts.

 

(also, sorry about the signature thing. i will have to read through the guideline)

 

thanks.

Posted

Just received email from my host. They state:

 

Looks like persistent connections are NOT good for your website, given the problems you are describing.

 

Persistent connections mysql_pconnect - are just that.  The connection stays open when the PHP script terminates.  Persistent connections only make sense when PHP is executing a module within a Web server that continues to run after the PHP script is done.  I would use mysql_connect and mysql_close in all other instances.

 

Using mysql_close is the best way to disconnect when the script terminates.

 

Regards,

 

FatCow Customer Service

 

What do you think? What files would I add this code to? or will it work?

Posted

The mysql connection is between your server and mysql server so turning off persistent connections causes your server to open and close the mysql connection between client requests instead or reusing the existing connection.

 

Client1->YourServer->mysql

Client2->YourServer->mysql

 

You probably need a new host that can handle your traffic.

 

Otherwise you need to tune your mysql usage.

 

Turn off category counts

Add Indexes

Cache categories/manufatures

Sessions to file not mysql

Check parse time log

Posted

Holy smokes. I did all but the contrib and my parse time for my index is 2.235s!!! I just checked processes running again nand it's already way up. You think I am on a high traffic server? or is there another issue here?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...