03-02-2006, 12:54 PM
By default, most MySQL databases are installed with the maximum number of connections set to 100. You can verify the settings for your server by running the command mysqladmin variables and looking at the max_connections setting.
If you or your visitors frequently get a "too many connections" error message when trying to connect to your MySQL driven site you can add the following code to your /etc/my.cnf file to increase the number of connections. (You can set the number to higher than 250 connections but be aware of memory limitations). Restart MySQL after adding the code.
If you or your visitors frequently get a "too many connections" error message when trying to connect to your MySQL driven site you can add the following code to your /etc/my.cnf file to increase the number of connections. (You can set the number to higher than 250 connections but be aware of memory limitations). Restart MySQL after adding the code.
Code:
[mysqld]
set-variable=max_connections=250