Recurring 502 Bad Gateway (nginx) and 504 Gateway Time-out (nginx) error
Thanks to all community members for the great support provided.
I’m dealing with a Vps with Wordpress Installation, Lemp based.
Today morning my site was stocked in an 502 Bad Gateway (nginx) so I
“service ningx restarted”
“service php5-fpm restarted”
“stop: Unknown instance:
php5-fpm start/running, process 1012”
So I uncommented the “# reload signal USR2” line within the php5-fpm.conf file
But I hadn’t any fortune and after 2 hours of missing attempts, I decided to reboot the droplet.
“sudo shutdown -h now”
and then I switched it on by the console on digitalocean.com
After that I could restart my php5-fpm and had my website online but the system look unstable and slow.
Connecting to the site the server gives me first 502 or 504 error.
If I restart php5-fpm and nginx it looks working but if I clic again through the site it gives me again the above errors. Mmmmmmmm.....
After checking web server installation, running and syntax configuration file. After checking Port, Dns and permission settings, I went through the log side of the moon.
I have to say that I found a lot of stuff but tried to move in a rational way.
first I checked the php5-fpm.log.4.gz and it gave me the following lines:
[27-Apr-2016 12:25:17] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful.
But I supposed it’s been sorted uncommenting the: “# reload signal USR2”
Then I move to the nginx dir. and I checked first the:
error.log file and I found
[notice] 25991#0: using inherited sockets from “9;”
and then the site-available.error.log.4 file and I found
2016/04/27 12:13:29 [error] 3085#0: *31943 connect() to unix:/var/run/ajenti-v-php-fcgi-ggtestit-php-fcgi-0.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 22.214.171.124, server: mysite, request: “POST /xmlrpc.php HTTP/1.0”, upstream: “fastcgi://unix:/var/run/ajenti-v-php-fcgi-ggtestit-php-fcgi-0.sock:”, host: “126.96.36.199”
Sorry for the long post but I want to provided as much information as I can of an hell day.
I don’t really know where to look or what to do, so please is there anyone that can help me?
Have you any suggestion?
Thanks a lot