修改完apache配置:
<IfModule prefork.c>
ServerLimit 20000
StartServers 5
MinSpareServers 5
MaxSpareServers 20
MaxClients 18000
MaxRequestsPerChild 4000
</IfModule>
报如下错误:
WARNING: MaxClients of 18000 exceeds ServerLimit value of 256 servers
原因是:ServerLimit的设置默认是256
修改源码参数,从新编译,安装就可以。
# cd SOURCE_HTTPD
# cd server/mpm/prefork
- Modified prefork.c file.
# vi prefork.c
Old:
#define DEFAULT_SERVER_LIMIT 256
New:
#define DEFAULT_SERVER_LIMIT 30000
# cd SOURCE_HTTPD
# make clean
# make
# make install