Apache 企业级容错配置与优化指南
1. Apache MPM 配置
Apache 有不同的多处理模块(MPM),如 worker 和 prefork。以下是 worker MPM 的配置示例:
<IfModule mpm_worker_module> ServerLimit 16 StartServers 3 MinSpareThreads 75 MaxSpareThreads 250 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 0 </IfModule>prefork MPM 与 event 和 worker 有所不同,它生成进程而非线程。prefork MPM 的默认配置如下:
<IfModule mpm_prefork_module> ServerLimit 16 StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 250 MaxConnectionsPerChild 0 </IfModule&