MaxClients
文件中的参数httpd.conf
设置 apache 服务器的最大连接数限制。默认连接限制为 256。
httpd.conf
您可以通过打开文件并搜索 MaxClients来检查您的服务器。
linux 中 httpd.conf 的默认位置是/etc/httpd/conf/httpd.conf
.
在 windows 上,conf 文件的默认位置是C:/Program Files/Apache Group/Apache/conf/httpd.conf
它看起来像这样。
# 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
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
您可以将MaxClients
值设置为所需的任何值,然后重新启动服务器以应用更改。