R
R
ruboss2016-04-10 23:22:26
linux
ruboss, 2016-04-10 23:22:26

Why has the number of RequestWorkers mpm_prefork increased dramatically?

Hello!
There is a project, usually there are about 700-1000 people online on it.
Apache with mpm_prefork

<IfModule mpm_prefork_module>
StartServers       1
MinSpareServers    1
MaxSpareServers    10
MaxRequestWorkers       250
MaxConnectionsPerChild   0
</IfModule>

Previously, I calmly kept such online with such settings.
Today it started to give an error in the Apache logs
[mpm_prefork:error] [pid 2546] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Changed the settings to the following:
<IfModule mpm_prefork_module>
StartServers       1
MinSpareServers    1
MaxSpareServers    10
ServerLimit             5000
MaxRequestWorkers       5000
MaxConnectionsPerChild   0
</IfModule>

Further, through ps -aux I see 2500 apache processes ...
Who knows what the problem is or maybe it's a space dudos?
Z.Y. There was iptables on the server, while the number of processes increased, it turned on the filter on port 80.
This is what nmap gave out by IP until I turned off the firewall
PORT   STATE SERVICE
21/tcp open  ftp
22/tcp open  ssh
25/tcp open  smtp
53/tcp open  domain
80/tcp filtered  http

Tell me what to do in this situation, thanks!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Victor Taran, 2016-04-13
@shambler81


StartServers 1
MinSpareServers 1
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0 is
not enough, however, first of all,
if you have memory, do at least
StartServers 10
MinSpareServers 10
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0
As a rule, memory is enough for this with a large margin.
That's just 1 it's theoretically even with nginx it's very easy to debug you.

R
ruboss, 2016-04-11
@ruboss

Yes, it was a dudos, it seems that such miracles do not happen, gentlemen. It did not last long, reached 2700 processes and merged xD. 5 GB of RAM was enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question