lost and found ( for me ? )

Tuning Apache 2.4.6(MaxClients, MaxServers etc) on CentOS7

Reference

[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

[root@localhost ~]# yum install httpd -y

[root@localhost ~]# httpd -version
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 19 2015 21:43:13

confirm which multi processing module(prefork, worker, event) Apache loads.
In my case, Apache loads prefork module.
# httpd -V
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 19 2015 21:43:13
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
 threaded:     no
   forked:     yes (variable process count)
Server compiled with....


[root@localhost ~]# httpd -M | grep prefork
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
mpm_prefork_module (shared)

[root@localhost ~]# grep -v ^# /etc/httpd/conf.modules.d/00-mpm.conf | grep -v ^$
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

edit httpd.conf
[root@localhost ~]# tail -10 /etc/httpd/conf/httpd.conf
IncludeOptional conf.d/*.conf

<IfModule mpm_prefork_module>
 StartServers       100
 MinSpareServers    100
 MaxSpareServers    100
 MaxClients         512
 ServerLimit 512
 MaxRequestsPerChild  1000
</IfModule>

restart httpd to reflect that.
[root@localhost ~]# systemctl restart httpd.service

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.