I build a site in CodeIgniter, which have to handle thousand of users in minute or like that. Is there any limit of maximum simultaneous connections for MySQL and PHP?

  • 1
    Yes there are limits. CPU, RAM and bandwidth. – mailq Sep 8 '11 at 18:34
  • @mailq, and those are only limits because your money $$$ supply is finite. – Zoredache Sep 8 '11 at 19:24


The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform, the amount of RAM available, how much RAM is used for each connection, the workload from each connection, and the desired response time. Linux or Solaris should be able to support at 500 to 1000 simultaneous connections routinely and as many as 10,000 connections if you have many gigabytes of RAM available and the workload from each is low or the response time target undemanding. Windows is limited to (open tables × 2 + open connections) < 2048 due to the Posix compatibility layer used on that platform.

but since you provide only 1 database user in the config.php file, I guess the whole thing works with 1 connection.

as of php, I don't really think there is a limit, you can open as many connections as your database server can handle, and of course your application server too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.