Answer the question
In order to leave comments, you need to log in
Apache optimization. How to increase the maximum number of Apache Connects?
Good afternoon! There is a loaded north, I can’t figure out the optimization, tell me please. Please do not advise to kill an Indian, an Indian is needed because of the specifics of the sites!
connections regularly rest against the ceiling of 300, although it costs 400 in the config.
Why is this and what should be changed? UPD - I sort of understood, I need to set ServerLimit more, although I didn’t try to figure it out for how long I didn’t understand what these values mean lower, it’s not clear what ServerLimit means in particular and why so many Apache processes are created (sometimes I saw 300+, hung, only Apache restart helped).
The config is as follows (apache in prefork mode):
<IfModule mpm_prefork_module>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 400
MaxRequestsPerChild 10000
</IfModule>
MaxSpareServers
ServerLimit
256 connections, but a maximum of MaxClients
400? And MaxRequestsPerChild
this is the number of requests to one of the servers, after which it will be killed, and a new one will be launched? Did I get it right? StartServers
from the Child thread of this server? [email protected]:~# ps -ylC apache2 | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Process Size (MB): "x/((y-1)*1024)}'
Apache Memory Usage (MB): 6487.27
Average Process Size (MB): 53.1743
MaxRequestsPerChild
= 100000+ , then there will be only MaxSpareServers
~ 100 maximum. each will take 200MB MaxRequestsPerChild
= 1000 and MaxSpareServers
= 1000 which take only 20MB at startup, then the meaning of Opcache is lost or not? Why is OPcache needed because sites work very fast with it, but I do not understand the process of storing compiled code (where is it stored when it is killed?) and how to optimize it better. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question