Plesk - 502 bad gateway frequently

6.5k views Asked by At

I'm facing with this error from few days, maybe weeks. I've tried and tried and tried all kind of solutions over the internet but with no success, so:

I have a dedicated server with Plesk 12 and Ubuntu 14.04 LTS.

This error appear daily, 1-2 times per day and I have to restart whole server and then all websites are working properly until next time this error appear again.

First time it appeared when I have added two more domains to be hosted. I suspected high server loading but no, rams never gets almost completely and cpu load is max 20%.

PS: Error appear only on websites, so I can access Plesk Panel and reboot server.

NGINX error log (/var/log/nginx/error.log):

[error] 1406#0: *119083 connect() failed (111: Connection refused) while connecting to upstream, client: IP, server: , request: "GET http://www.example.com/ HTTP/1.1", upstream: "http://SERVER_IP:7080/", host: "www.example.com"

It is first time when I'm using Plesk and I don't really know how to do or check... .

PS: Can this be caused by a cron job service? Cron log which is worrying me:

254 postfix/master[1664]: warning: master_wakeup_timer_event: service pickup(public/pickup): Connection refused
1

There are 1 answers

0
Oleg Neumyvakin On
"(111: Connection refused) while connecting to upstream" 

this error means that something goes wrong with Apache or PHP-FPM(if you have using it), check apache logs of site where it happens: /var/www/vhosts/examples.com/logs/error_log