502 Bad Gateway nginx/1.6.2 Error

February 21, 2015 46k views

I am having this problem on my website 502 Bad Gateway

nginx/1.6.2 and I don't know how to fix. could any of you lend me a hand please?
thank you

6 Answers

What do the logs show you about it?

Honestly I had someone look into it, it got fixed and now it happens every 10 minutes. I run the cmd sudo service php5-fpm restart, it works for a couple of minutes and then, I have to do it all over again.
I am out of ideas because I am new to this kind of procedures

Your PHP is failing, thats why it works when you restart the service, you need to check the root cause, how many concurrent users you have, how much ram your droplet has, whats the PHP-FPM configurations params, etc....

Post more details and maybe we can help you.

Can you provide which OS you are using?

If you are using ubuntu with an ispconfig config:
or just a manual setup (without ispconfig or other control panel):

Have another answer? Share your knowledge.