Forum Moderators: open

Message Too Old, No Replies

Max number of connections in MySQL

Max number of connections in MySQL

         

therob

10:04 pm on Apr 11, 2006 (gmt 0)

10+ Year Member



MySQL by default is set to max 125 concurrent connections which can be increased in my experience to 200 without much problem.

My question is, how many visitors a day would a typical forum on a website not using persistent connects be able to handle?

My guess is maximum 500 users at one time online and 50,000 unique users a day.

Any opinions?

Thanks.

coopster

12:58 am on Apr 12, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, therob.

Persistent connections have nothing to do with web (HTTP) applications since they are all "stateless" connections. As far as how many connections the database server can handle is likely more reliant upon your server hardware than it is your database, provided you have written your applications and statements at optimized levels and have things configured correctly.

perfectcoding

9:44 am on Apr 12, 2006 (gmt 0)

10+ Year Member



I'm not sure whether your questions is about the number of concurrent connections MySQL can handle, or if you're asking if there's any limit on the number of users a forum can handle. I would suspect the former, but the questions suggests the latter.

If it's the former, then here's my anwser:

From the MySQL manual:

The number of connections allowed is controlled by the max_connections system variable

The default is 100 connections.

The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform. Linux or Solaris should be able to support 500-1000 simultaneous connections, depending on how much RAM you have and what your clients are doing. Static Linux binaries provided by MySQL AB can support up to 4000 connections.

----------------------

If it's the latter, then I would say: "I don't know", but I would add that, as the previous poster noted, you're probably going to be restricted by the absolute limits of your hardware before you run into problems with MySQL or forum software.

Don't quote me on that.

therob

8:55 pm on Apr 12, 2006 (gmt 0)

10+ Year Member



Thank you, that answers a question a had for some time.

I thought mysql by nature limited connections to 200 at most. But now I understand its only limitations are the power of the machine that is currently running.