apache多线程配置
命令行输入:httpd –l
结果如下:
core.c
mod_win32.c
mpm_winnt.c
http_core.c
mod_so.c
mpm有如下几种模式,每个操作系统需要选择一种模式,windows版本的默认安装为mpm_winnt
mpm_prefork_module
mpm_worker_module
mpm_beos_module
mpm_netware_module
mpm_mpmt_os2_module
mpm_winnt_module
配置如下:
#Include conf/extra/httpd-mpm.conf 去掉#
在httpd-mpm.conf 里面
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt_module>
ThreadsPerChild 1000
MaxRequestsPerChild 5000
</IfModule>