Apache crashing constantly

Issues related to applications and software problems and general support
Blisk
Posts: 316
Joined: 2011/07/04 14:49:51
Contact:

Apache crashing constantly

Post by Blisk » 2021/06/09 07:53:46

I have troubles with apache which crashing constantly.
When I check systemctl status httpd
it is not running
when I check apache pid it exist, so monit doesn't recognise apache is off, to start it.
is there any other way when apache crash to automatically start it?

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Apache crashing constantly

Post by lightman47 » 2021/06/09 10:28:51

Wouldn't it just be easier to stop the crashing? What's in /var/log/httpd/error_log after it crashes?

Blisk
Posts: 316
Joined: 2011/07/04 14:49:51
Contact:

Re: Apache crashing constantly

Post by Blisk » 2021/06/09 10:50:55

yes but I tried to repair that and no luck. that's why I try to find another solution.
here is log

Current thread 0x00007f6888f34940 (most recent call first):
[Sun Jun 06 13:28:35.303898 2021] [suexec:notice] [pid 1657074] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 06 13:28:35.306349 2021] [ssl:warn] [pid 1657074] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 13:28:35.336917 2021] [ssl:warn] [pid 1657074] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 13:28:35.337576 2021] [lbmethod_heartbeat:notice] [pid 1657074] AH02282: No slotmem from mod_heartmonitor
[Sun Jun 06 13:28:35.342397 2021] [http2:warn] [pid 1657074] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun Jun 06 13:28:35.342575 2021] [:notice] [pid 1657074] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Sun Jun 06 13:28:35.342584 2021] [:notice] [pid 1657074] mod_python: using mutex_directory /tmp
[Sun Jun 06 13:28:35.436648 2021] [core:warn] [pid 1657074] AH00098: pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun Jun 06 13:28:35.449515 2021] [mpm_prefork:notice] [pid 1657074] AH00163: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9 mod_python/3.5.0- Python/3.6.8 PHP/7.4.15 configured -- resuming normal operations
[Sun Jun 06 13:28:35.449542 2021] [core:notice] [pid 1657074] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Jun 06 13:40:19.601914 2021] [mpm_prefork:notice] [pid 1657074] AH00170: caught SIGWINCH, shutting down gracefully
[Sun Jun 06 13:42:47.840429 2021] [suexec:notice] [pid 1273] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 06 13:42:48.098170 2021] [ssl:warn] [pid 1273] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 13:42:48.703722 2021] [ssl:warn] [pid 1273] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 13:42:48.704409 2021] [lbmethod_heartbeat:notice] [pid 1273] AH02282: No slotmem from mod_heartmonitor
[Sun Jun 06 13:42:48.705854 2021] [http2:warn] [pid 1273] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun Jun 06 13:42:48.706004 2021] [:notice] [pid 1273] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Sun Jun 06 13:42:48.706009 2021] [:notice] [pid 1273] mod_python: using mutex_directory /tmp
[Sun Jun 06 13:42:51.566877 2021] [mpm_prefork:notice] [pid 1273] AH00163: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9 mod_python/3.5.0- Python/3.6.8 PHP/7.4.15 configured -- resuming normal operations
[Sun Jun 06 13:42:51.566954 2021] [core:notice] [pid 1273] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Jun 06 14:15:29.621409 2021] [mpm_prefork:notice] [pid 1273] AH00170: caught SIGWINCH, shutting down gracefully
[Sun Jun 06 14:15:50.956009 2021] [suexec:notice] [pid 95815] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 06 14:15:50.965847 2021] [ssl:warn] [pid 95815] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 14:15:51.035586 2021] [ssl:warn] [pid 95815] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 14:15:51.036312 2021] [lbmethod_heartbeat:notice] [pid 95815] AH02282: No slotmem from mod_heartmonitor
[Sun Jun 06 14:15:51.037939 2021] [http2:warn] [pid 95815] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun Jun 06 14:15:51.038058 2021] [:notice] [pid 95815] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Sun Jun 06 14:15:51.038063 2021] [:notice] [pid 95815] mod_python: using mutex_directory /tmp
[Sun Jun 06 14:15:51.175136 2021] [mpm_prefork:notice] [pid 95815] AH00163: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9 mod_python/3.5.0- Python/3.6.8 PHP/7.4.20 configured -- resuming normal operations
[Sun Jun 06 14:15:51.175165 2021] [core:notice] [pid 95815] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Jun 06 14:17:09.786572 2021] [mpm_prefork:notice] [pid 95815] AH00170: caught SIGWINCH, shutting down gracefully
[Sun Jun 06 02:20:24.541110 2021] [suexec:notice] [pid 1777] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Jun 06 02:20:24.649276 2021] [ssl:warn] [pid 1777] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 02:20:24.723849 2021] [ssl:warn] [pid 1777] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Jun 06 02:20:24.724611 2021] [lbmethod_heartbeat:notice] [pid 1777] AH02282: No slotmem from mod_heartmonitor
[Sun Jun 06 02:20:24.726408 2021] [http2:warn] [pid 1777] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sun Jun 06 02:20:24.726533 2021] [:notice] [pid 1777] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Sun Jun 06 02:20:24.726539 2021] [:notice] [pid 1777] mod_python: using mutex_directory /tmp
[Sun Jun 06 02:20:24.833030 2021] [mpm_prefork:notice] [pid 1777] AH00163: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9 mod_python/3.5.0- Python/3.6.8 PHP/7.4.20 configured -- resuming normal operations
[Sun Jun 06 02:20:24.833058 2021] [core:notice] [pid 1777] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Jun 09 09:45:28.168360 2021] [mpm_prefork:notice] [pid 1777] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Jun 09 09:49:20.548645 2021] [suexec:notice] [pid 2218] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jun 09 09:49:20.724755 2021] [ssl:warn] [pid 2218] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jun 09 09:49:20.804785 2021] [ssl:warn] [pid 2218] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jun 09 09:49:20.805505 2021] [lbmethod_heartbeat:notice] [pid 2218] AH02282: No slotmem from mod_heartmonitor
[Wed Jun 09 09:49:20.807021 2021] [http2:warn] [pid 2218] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Wed Jun 09 09:49:20.807138 2021] [:notice] [pid 2218] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Wed Jun 09 09:49:20.807144 2021] [:notice] [pid 2218] mod_python: using mutex_directory /tmp
[Wed Jun 09 09:49:20.961243 2021] [mpm_prefork:notice] [pid 2218] AH00163: Apache/2.4.37 (centos) OpenSSL/1.1.1g mod_fcgid/2.3.9 mod_python/3.5.0- Python/3.6.8 PHP/7.4.20 configured -- resuming normal operations
[Wed Jun 09 09:49:20.961276 2021] [core:notice] [pid 2218] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Jun 09 09:57:52.666853 2021] [mpm_prefork:notice] [pid 2218] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Jun 09 09:57:56.870069 2021] [suexec:notice] [pid 5257] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jun 09 09:57:56.872394 2021] [ssl:warn] [pid 5257] AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Apache crashing constantly

Post by lightman47 » 2021/06/09 11:38:19

Although I've no knowledge about either, it seems to be routinely complaining about that mpm module incompatibility and also your SSL certificate. If it were me, that's what I'd start investigating/researching.

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Apache crashing constantly

Post by pjsr2 » 2021/06/09 11:42:36

First check that there are really no more httpd processes running, even when "systemctl status httpd" reports that the web server has stopped.

Code: Select all

ps -e -f | grep httpd
Then verify that no other program is using port 8080:

Code: Select all

sudo ss -l -n -p | grep ':8080'
Check your apache configuration:

Code: Select all

apachectl configtest
AH01906: 172.ablak.arnes.si:8080:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
Looks like you have a configuration problem with your certificates.
If this is a self-signed certificate, check that the host name in the certificate matches exactly the name of your server. If this is a certificate signed by some external CA, then you have mixed up the certificate file names in your configuration.

Blisk
Posts: 316
Joined: 2011/07/04 14:49:51
Contact:

Re: Apache crashing constantly

Post by Blisk » 2021/06/09 11:55:40

thank you I will check all when it crash again.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache crashing constantly

Post by TrevorH » 2021/06/09 16:12:40

What is the output from httpd -M | grep system ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Blisk
Posts: 316
Joined: 2011/07/04 14:49:51
Contact:

Re: Apache crashing constantly

Post by Blisk » 2021/06/09 16:15:58

[root@172 ~]# httpd -M | grep system
systemd_module (shared)

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache crashing constantly

Post by TrevorH » 2021/06/09 16:39:31

So your htpd process is being sent a SIGWINCH signal by systemd because it doesn't think it has started up correctly. The usual cause of that is that someone has stopped it from loading the systemd apache module that talks back to systemd to say "I'm here". It's loaded from /etc/httpd/conf.modules.d/00-systemd.conf and it's required.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Blisk
Posts: 316
Joined: 2011/07/04 14:49:51
Contact:

Re: Apache crashing constantly

Post by Blisk » 2021/06/10 15:11:30

that file exist and contains
# This file configures systemd module:
LoadModule systemd_module modules/mod_systemd.so

Post Reply