Error: AH10159: MinSpareThreads of MaxRequestWorkers

fast

Verified User
Joined
Jun 29, 2019
Messages
8
Hi Forums,
I've been having trouble accessing my websites lately. Whenever I restart php and apache the problem goes away. But after 30 minutes my websites are down again.
I own 150 websites on a small scale. I get following apache error log:

AH10159: server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting
AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

I tried many solutions. What should be the optimum httpd-mpm.conf setting?

Server:
24 Core Cpu
64 GB Ram
150 Wordpress Web site / No Plugins (minimal pages)

My httpd-mpm.conf;

Rich (BB code):
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    ServerLimit            450
    MaxRequestWorkers   450
    MaxConnectionsPerChild   10000
</IfModule>

<IfModule mpm_worker_module>
    StartServers             6
    MinSpareThreads        100
    MaxSpareThreads        250
    ThreadsPerChild         50
    MaxRequestWorkers      500
    MaxConnectionsPerChild   10000
</IfModule>

<IfModule mpm_event_module>
    StartServers             6
    MinSpareThreads        100
    MaxSpareThreads       300
    ThreadsPerChild         64
    ServerLimit             32
    MaxRequestWorkers     2048
    MaxConnectionsPerChild   10000
</IfModule>

<IfModule mpm_netware_module>
    ThreadStackSize      65536
    StartThreads           250
    MinSpareThreads         25
    MaxSpareThreads        250
    MaxThreads            1000
    MaxConnectionsPerChild   0
</IfModule>



<IfModule mpm_mpmt_os2_module>
    StartServers             2
    MinSpareThreads          5
    MaxSpareThreads         10
    MaxConnectionsPerChild   0
</IfModule>
 
what's php_mode ? php-fpm or something else ?

for mpm_event_module

try tuning ServerLimit and MaxRequestWorkers

Code:
    ServerLimit             48
    MaxRequestWorkers     3072

this is simple calculate

MaxRequestWorkers = ServerLimit * ThreadsPerChild = 48 * 64 = 3072
 
@jamgames2 Thank you for your reply and thanks for this good information.

Yes I am using PHP-FPM. It consumes 1.8GB - 2.2GB on average usage. Apache: 1.8GB Load Usage.

I set it as you said server limit and reqwork. Let's see if it turns off again in 30 minutes.

Edit: I noticed something, when I do ./build_rewriteconf, httpd-mpm reverted to default values. How can I save these values permanently? When I do /build reweriteconf the old values come back.
 
put it into something like

/usr/local/directadmin/custombuild/custom/ap2/conf/extra/httpd-mpm.conf

p.s. create folder and file if not exists
 
Back
Top