• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Nginx 502 Bad Gateway Error

G1bsoN

New Pleskian
Hi!
I use Plesk Panel 11.5.30 on Centos 6.5 x86_64 with nginx as a proxy.
Customers can see "502 Bad Gateway" sometimes, and I see this in my logs:
/var/log/nginx/error.log:

2014/10/06 12:00:14 [error] 7642#0: *1557 connect() failed (111: Connection refused) while connecting to upstream, client: 82.137.166.136, server: userdomain.com, request: "GET /askfm/index.php HTTP/1.1", upstream: "http://mypleskip:7080/askfm/index.php", host: "userdomain.com", referrer: "http://userdomain.com/askfm"

In this moment in /var/log/http/error_log

[Mon Oct 06 12:00:12 2014] [notice] caught SIGTERM, shutting down
[Mon Oct 06 12:00:14 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Oct 06 12:00:15 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.9 mod_jk/1.2.37 mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

Which means that Apache is normally restarted by Plesk if one of a customers make some changes on his domain.
This situation looks normally for me, but it's unacceptable for customers! This makes customer think, that server is fault and hosting is unstable!

I tried to find solution of this problem in kb articles and here, but i didn't find anything. Here http://talk.plesk.com/threads/nginx-502-bad-gateway.312640/ is the same trouble, but there is no answer...
Did anybody found the solution of this problem?
 
Have you tried to increase the FastCGI buffer size to resolve the issue as below?

# cat /etc/sw-cp-server/config|grep 'fastcgi_buffer'
fastcgi_buffers 128 2048k;
fastcgi_buffer_size 2048k;
 
Have you tried to increase the FastCGI buffer size to resolve the issue as below?


Yes, I tried, but it didn't help.
And if I remember correctly, sw-cp-server - it is a plesk panel gui... I'm sorry if I describe the problem not enough clear.
Error "502 Bad Gateway" nginx shows on customers sites hosted in my Plesk Panel, not in customer CP.
 
G1bsoN, you're not alone. Since my system last updated, I'm expierencing this issues as well...

It worked great before...

Edit: I'm using Plesk 12.0.18 though...
 
Back
Top