Jason Hilton Posted April 14, 2004 Posted April 14, 2004 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???
♥Vger Posted April 14, 2004 Posted April 14, 2004 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
Jason Hilton Posted April 14, 2004 Author Posted April 14, 2004 I wish I could, go daddy doesn't have a control panel of any kind, only ftp and web stat.
Jason Hilton Posted April 14, 2004 Author Posted April 14, 2004 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?
katie81 Posted April 14, 2004 Posted April 14, 2004 looks like your go daddy is going nowhere, it'll fix itself after a while once the connections go down. katie
♥Vger Posted April 14, 2004 Posted April 14, 2004 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
user99999999 Posted April 15, 2004 Posted April 15, 2004 If it times out like that then your host has some type of bandwidth cap or slamming protection that your server has triggered.
rseigel Posted April 15, 2004 Posted April 15, 2004 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. ;)
phethean Posted April 15, 2004 Posted April 15, 2004 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.
Guest Posted April 15, 2004 Posted April 15, 2004 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.
brett Posted April 15, 2004 Posted April 15, 2004 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.
phethean Posted April 15, 2004 Posted April 15, 2004 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.
phethean Posted April 15, 2004 Posted April 15, 2004 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?
user99999999 Posted April 15, 2004 Posted April 15, 2004 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
user99999999 Posted April 15, 2004 Posted April 15, 2004 This mod helps also. http://www.oscommerce.com/community/contributions,1862
phethean Posted April 15, 2004 Posted April 15, 2004 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?
phethean Posted April 15, 2004 Posted April 15, 2004 user99999999, just got my host to change WAIT_TIMEOUT to 600 sec. instead of 28800 on mysql. hopefully this works. BTW you know anything about cookie issue? that is the last problem I am having with my store. Kinda off topic but I am stressin. My customers can only login with cookies disabled!? I have a thread going at http://www.oscommerce.com/forums/index.php?act=ST&f=1&t=87055 Thanks again.
rseigel Posted April 15, 2004 Posted April 15, 2004 Godaddy is famous for overloading servers. Your problem isn't going to go away.
phethean Posted April 15, 2004 Posted April 15, 2004 i'm with fatcow, but thanks for the info. hopefully the 10 min wait timeout fixes it...
phethean Posted April 16, 2004 Posted April 16, 2004 yep it worked. now to fix my 2.90s parse time... Thank you all. :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.