• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

502 bad gateway every day

Heppi75

Basic Pleskian
hi,

I am running centos 7 with plesk 12.5.30. since a few days I got 1 or 2 times the 502 bad gateway for a few minutes. most time it happens at night but not always on the same time - the 502 is shown about 4-7 minutes.

in the /var/log/httpd/error_log there is the following error shown:

Code:
[Wed May 04 05:00:02.361582 2016] [mpm_prefork:notice] [pid 23543] AH00170: caught SIGWINCH, shutting down gracefully
[Wed May 04 05:00:04.132777 2016] [core:notice] [pid 30532] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed May 04 05:00:04.181823 2016] [suexec:notice] [pid 30532] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 04 05:00:04.291377 2016] [ssl:warn] [pid 30532] AH01909: RSA certificate configured for lists:443 does NOT include an ID which matches the server name
[Wed May 04 05:00:04.291653 2016] [ssl:warn] [pid 30532] AH01909: RSA certificate configured for default-222_22_22_22:443 does NOT include an ID which matches the server name
[Wed May 04 05:00:04.291917 2016] [ssl:warn] [pid 30532] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Wed May 04 05:00:04.291960 2016] [:notice] [pid 30532] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
[Wed May 04 05:00:04.291964 2016] [:notice] [pid 30532] ModSecurity: APR compiled version="1.4.8"; loaded version="1.4.8"
[Wed May 04 05:00:04.291968 2016] [:notice] [pid 30532] ModSecurity: PCRE compiled version="8.32 "; loaded version="8.32 2012-11-30"
[Wed May 04 05:00:04.291978 2016] [:notice] [pid 30532] ModSecurity: LUA compiled version="Lua 5.1"
[Wed May 04 05:00:04.291980 2016] [:notice] [pid 30532] ModSecurity: LIBXML compiled version="2.9.1"
[Wed May 04 05:00:04.291982 2016] [:notice] [pid 30532] ModSecurity: Original server signature: Apache
[Wed May 04 05:00:04.291984 2016] [:notice] [pid 30532] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Wed May 04 05:00:04.308714 2016] [so:warn] [pid 30532] AH01574: module actions_module is already loaded, skipping
[Wed May 04 05:00:04.310957 2016] [so:warn] [pid 30532] AH01574: module headers_module is already loaded, skipping
[Wed May 04 05:00:04.311240 2016] [so:warn] [pid 30532] AH01574: module logio_module is already loaded, skipping
[Wed May 04 05:00:04.312355 2016] [so:warn] [pid 30532] AH01574: module suexec_module is already loaded, skipping
[Wed May 04 05:00:04.951686 2016] [auth_digest:notice] [pid 30532] AH01757: generating secret for digest authentication ...
[Wed May 04 05:00:04.952911 2016] [lbmethod_heartbeat:notice] [pid 30532] AH02282: No slotmem from mod_heartmonitor
[Wed May 04 05:00:05.060362 2016] [ssl:warn] [pid 30532] AH01909: RSA certificate configured for lists:443 does NOT include an ID which matches the server name
[Wed May 04 05:00:05.060634 2016] [ssl:warn] [pid 30532] AH01909: RSA certificate configured for default-222_22_22_22:443 does NOT include an ID which matches the server name
[Wed May 04 05:00:05.060899 2016] [ssl:warn] [pid 30532] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Wed May 04 05:00:05.103720 2016] [mpm_prefork:notice] [pid 30532] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips Apache mod_fcgid/2.3.9 mod_perl/2.0.9dev Perl/v5.16.3 configured -- resuming normal operations
[Wed May 04 05:00:05.103752 2016] [core:notice] [pid 30532] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

no entry in the /var/log/nginx/error.log or in the error_log of the requested domain ...

I have a shell-script that executes every 15 minutes and checks the status of apache/domain. if other than 200 it does a restart of apache (systemctl restart httpd). so the log entry above is due this script (I think) because the bad gateway is from 04:57:20 - but after the restart the site is shown again about 5 minutes the bad gateway - after about some minutes all is working again??

the monitoring system shows the following messages:
04.05.2016 04:58:20 Fehler, HTTP/1.1 502 Bad Gateway
04.05.2016 04:57:20 Warnung, HTTP/1.1 502 Bad Gateway
04.05.2016 03:32:19 Ok, 428 ms
04.05.2016 03:32:19 Warnung, Read timed out.
04.05.2016 00:53:19 Ok, 702 ms

I also tried the following post by changing in both (logrotate and modsecurtiy) to restart - it is not solving my problem (https://talk.plesk.com/threads/apache-reload-graceful-restart-causes-apache-segfault.335534/)

could anyone help me to find out what is the reason for the bad gateway 502 each day?
 
Back
Top