0

i have a web server on Debian and Apache2, about once a day or once every 2 days Apache2 crashes, here are the Apache2 error logs:

[Wed May 22 13:04:01.082969 2024] [mpm_prefork:error] [pid 874799] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting




 [Wed May 22 13:04:23.002222 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156942 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:23.002268 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156563 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:27.651741 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156881 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:27.651781 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156525 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:27.651789 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156820 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:27.651798 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156883 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:31.000291 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1151570 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:31.000319 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156574 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:31.000326 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156542 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:31.000334 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156825 graceful kill fail, sending SIGKILL
[Wed May 22 13:04:31.000342 2024] [fcgid:warn] [pid 884698] mod_fcgid: process 1156578 graceful kill fail, sending SIGKILL

next error:

[Wed May 22 13:05:06.178950 2024] [mpm_prefork:notice] [pid 874799] AH00170: caught SIGWINCH, shutting down gracefully

and:

    [Wed May 22 13:05:14.782075 2024] [fcgid:error] [pid 884698] FastCGI process 1156923 still did not exit, terminating forcefully
[Wed May 22 13:05:14.782134 2024] [fcgid:error] [pid 884698] FastCGI process 1164783 still did not exit, terminating forcefully
[Wed May 22 13:05:14.782142 2024] [fcgid:error] [pid 884698] FastCGI process 1164793 still did not exit, terminating forcefully
[Wed May 22 13:05:14.782151 2024] [fcgid:error] [pid 884698] FastCGI process 1164968 still did not exit, terminating forcefully
[Wed May 22 13:05:14.782159 2024] [fcgid:error] [pid 884698] FastCGI process 1165001 still did not exit, terminating forcefully
[Wed May 22 13:05:14.782168 2024] [fcgid:error] [pid 884698] FastCGI process 1165012 still did not exit, terminating forcefully
[Wed May 22 13:05:14.782177 2024] [fcgid:error] [pid 884698] FastCGI process 1165027 still did not exit, terminating forcefully

then, until Apache 2 is rebooted, the site does not turn on.

I tried changing the mpm_prefork.conf config and putting the following configuration there:

#StartServers                  10
#MinSpareServers               10
#MaxSpareServers               20
#ServerLimit                   2000
#MaxRequestWorkers             1500
#MaxConnectionsPerChild        10000

current mpm_prefork.conf:

StartServers            5
MinSpareServers         5
MaxSpareServers         10
MaxRequestWorkers       150
MaxConnectionsPerChild  0

The virtual machine has 8 processor cores and 16 RAM cores. At the moment when errors were pouring in, I looked at the htop and there were tasks from 250 to 390 approximately, the average load can grow to 9-10, although usually it is 0.5-1.5, there is also a lot of free RAM, about 4-5 gigabytes are occupied at the moment of high load

This happens at random times, I don’t understand what to do, please help!

1 Answer 1

0

SIGWINCH and "graceful kill" implies that something was asking httpd to shutdown (this is not what SIGWINCH was originally intended for - Apache re-purposed it for this). I'm guessing you already checked uptime to verify that only httpd was stopping?

Exactly what that was triggering the stop should be known from your logs. /var/log/cron.log and /var/log/syslog would be a good starting point.

1
  • 1. I'm new to setting up servers, I haven't checked this, how to do this? 2. I have a lot of job crowns on my server that run all day, some run every 2-5 minutes, now after looking at the log, I moved some to the night/morning, where else can I look? I can edit the post and post the logs that you wrote to see, maybe I don’t see the obvious answer)
    – spider5414
    Commented May 22 at 16:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .