max_connections

If the value of Thread_connected is closed to max_connections, we may want to increase max_connections. If a client that should be connected to the server frequently cannot, that is too an indication that max_connections is too small.

mysqld actually allows max_connections+1 clients to connect. The extra connection is reserved for use by accounts that have the SUPER privilege. By granting the SUPER privilege to administrators and not to normal users (who should not need it), an administrator can connect to the server and use SHOW PROCESSLIST to diagnose problems even if the maximum number of unprivileged clients are connected.

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–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.

Increasing max_connections increases the number of file descriptors that mysqld requires. It is strongly suggested that you keep the maximum number of connections below 1500. See http://www.interworx.com/support/docs/nodeworx/mysql/howto-mysql-options

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License