I just installed apache 2.2.3 and already had the error “too many connections”. I went to my.cnf to increase max_connections but its not there!
The only content in it is:
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package). old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
So what can I do to increase max_connections?
Where can I find it?
Thanks a lot!
If you see a “too many connections” error in Apache, then editing my.cnf will not help, because that belongs to MySQL.
Edit /etc/apache2/apache2.conf instead.
In a default install, you will probably have the traditional prefork mpm, so you will need to edit the MaxClients directive inside the <IfModule mpm_prefork_module> block. If you are not sure, you can edit MaxClients in the other mpm blocks too.
Restart the server after changing config (/etc/init.d/apache2 restart).