Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EMERGENCY HELP NEEDED!


Jason Hilton

Recommended Posts

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???

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...