0

My website generate when I tried to hit 1000 requests per second on it. I am seeing the following errors in my apache logs

Apr 06 00:00:33 ns503772******100.net httpd[9585]: AH00515: WARNING: MaxRequestWorkers of 2000 would require 80 servers and
Apr 06 00:00:33 ns503772******100.net httpd[9585]: would exceed ServerLimit of 16, decreasing to 400.
Apr 06 00:00:33 ns503772******100.net httpd[9585]: To increase, please see the ServerLimit directive.

My current setting was following

<IfModule mpm_event_module>
LoadModule cgid_module modules/mod_cgid.so
MaxRequestWorkers 2000
</IfModule>

I'm am using Plesk Onyx and server specification are following.

Processor: Intel Xeon E5-1620v2 - 4c/8t - 3.7 GHz/3.9 GH

Sever Ram: 64GB DDR3

Then I have tried the following settings

<IfModule mpm_event_module>
StartServers                80
MinSpareThreads             50
MaxSpareThreads             300

ThreadLimit                 25
ThreadsPerChild             25

ServerLimit                 500
MaxRequestWorkers           2000
MaxConnectionsPerChild      0
</IfModule>

but issue remain un solved, infarct its generating more errors & log-writer started eating CPU

output of httpd -V | grep -i 'version\|mpm' is following

Server version: Apache/2.4.6 (CentOS)
Server MPM:     event
Hassaan
  • 429

1 Answers1

2

ServerLimit is not defined/not read, but still that value you want to try makes no sense since threads per child is already forcing the serverlimit to 80.

And why do you use so small number of threads? You are generating too many child processes without need, probably making Apache less performant in the process (spawn processes more expensive than threads)

Note: MPM settings require a FULL STOP/START (not restart).

Set this.

StartServers 1
ServerLimit 4
MinSpareThreads 500
MaxSpareThreads 1500
MaxRequestWorkers 2000
ThreadsPerChild 500
ThreadLimit 500
MaxConnectionsPerChild 0
MaxKeepAliveRequests 1500
KeepAlive On
KeepAliveTimeout 10

And do make sure you do a full stop then start for the changes to be applied for real.