2011-03-23 23 views
1

我剛剛安裝了apache 2.2.3,並且已經有錯誤「連接太多」。我去my.cnf增加max_connections,但它不在那裏!my.cnf中不存在max_connection

在它的唯一內容是:

[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 

所以我能做些什麼來提高MAX_CONNECTIONS?

我在哪裏可以找到它?

非常感謝!

+0

只需用'max_connections'自己添加一行,然後重新啓動服務器:) – Konerak 2011-03-23 19:55:04

回答

0

如果您在看到一個「太多的連接」的錯誤阿帕奇,然後修改my.cnf中不會幫助,因爲這屬於MySQL的

改爲編輯/etc/apache2/apache2.conf。

在默認安裝中,您可能會使用傳統的prefork mpm,因此您需要編輯< IfModule mpm_prefork_module >塊中的MaxClients指令。如果您不確定,您也可以在其他mpm塊中編輯MaxClients。

更改config(/etc/init.d/apache2 restart)後重新啓動服務器。

+0

thatnsk alot damon!這就是它! – roman 2011-03-24 16:14:37