我正在测试我的服务器,以了解它支持多少个并发连接。我mpm_prefork.conf
按以下方式配置:
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxRequestWorkers: maximum number of server processes allowed to start
# MaxConnectionsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 100000
MaxConnectionsPerChild 0
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
但是当我的服务器接收到~8200 个并发连接时,会触发错误并且 apache 不再响应:
[notice] caught SIGTERM, shutting down
服务器剩余足够的内存。
配置没问题吗?我需要更改什么吗?
谢谢
答案1
您可能遇到了系统进程限制。检查ulimit -u
并查看这个问题。