Forum Moderators: buckworks

Message Too Old, No Replies

(mySQL) max connections = 500 - good amount?

         

olimits7

5:51 pm on Oct 10, 2008 (gmt 0)

10+ Year Member



Hi,

I was just wondering what is the maximum number of mySQL connections you have set for your website? What is a good number to use for max_connections?

My website is currently set at max_connections = 500.

The reason I'm asking is I read in a forum that the below message happened to someone running oscommerce; so I just want to make sure my max_connections is high enough to prevent this from occurring to my website too:

============================
Warning: mysql_connect() [function.mysql-connect]: Too many connections in...
Unable to connect to database server!
============================

Thank you,

olimits7

Morgenhund

9:07 am on Oct 20, 2008 (gmt 0)

10+ Year Member



Essentially, tuning a DB server is much worse than just setting maximal number of connections. Additionally, it's just a matter of load imposed on your site tebefore backend SQL server dies, have you set 500+ connections or not. For ultimate solutions, pease refer to the following books by O'Reilly:

- "High Performance Web Sites"
- "High Performance MySQL"

However, are you sure your site will be owervhelmed with the requests one day? Will it bring a rise in profits as well? If not -- just do not bother and use your time for something else, rather that optimizing a site that possibly will work good enough as it is :-)