Plesk for Linux
kb: technical
ABT: Group A
Applicable to:
- Plesk for Linux
Symptoms
- In Tools & Settings > Apache Web Server, Apache restart interval value is set to 0.
- After settings update via Plesk sites show periodically show
502 Bad Gateway
error.
-
The records below can be found in
/var/www/vhosts/system/example.com/logs/proxy_error_log
:2020-04-29 13:35:29 Error 203.0.113.2 28571#0: *6219628 connect() failed (111: Connection refused) while connecting to upstream nginx error
2020-04-29 13:38:24 Error 203.0.113.2 31784#0: *6220942 peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking to upstream nginx error -
Also the following notification can be received by Watchdog:
The Web Server (Apache) service on host example.com is down. The problem was discovered on Jan 14, 2021 08:57 AM.
Cause
When the interval is set to 0, Apache web server restarts immediately to apply new domain settings. Apache restart causes websites unavailability.
Comments
1 comment
This article could be vastly improved with more information. How and why will this solve the 502 Bad Gateway error when settings are changed? Will it only postpone the problem 600 seconds into the future or will it actually solve the problem? If so, why? I assume setting restart interval to 600 will mean that I'll have to wait 10 minutes for new server settings to take effect? If so, this should be mentioned in the article with an explanation on how to choose a suitable restart interval. I tried changing restart interval to 1 second, and I still get the 502 Bad Gateway error after changing PHP settings in Plesk 18.0.54 Update #4.
However, enabling Apache graceful restart seem to have solved the problem on our side.
Please sign in to leave a comment.