502 Bad Gateway nginx

I kept getting this error whenever I had some syntax problem in PHP:

502 Bad Gateway nginx

I usually manage to find the syntax problems and get rid of the error, but right now I’m running out of ideas. I have an Ajax call to a PHP file that connects and queries the MySQL database then sends the result as JSON back to the JS function. Everything goes well when tested separately, but when I actually run the whole thing, I get this error.
Is there a way to make the server display PHP specific errors instead of this 502 Bad Gateway nginx thing?

The error is reproducing consistently on URL
archico.lt/otif/loaddata.php?db_tablename=projects&user=Giedre&level=projects and unfortunately there is nothing in Logs → Error logs in Control Panel to see as the Select Day combobox is empty for both domains archico.lt and giedre.rf.gd.

Can anyone from admins run a sudo service php5-fpm restart ?

We don’t run a traditional NGINX+PHP-FPM stack, so just running that command won’t do anything. Also, just turning it off and on again is not proper server management.

You’ll just have to debug the script yourself by going through it step by step to see what’s actually causing the issue.

hi admin,

My site have got an error 502 bad gateway nginx. my site was hosted on this ip address ( )
please help me. My site is http://pasadenavillagepuncak.com

Thank you…

I had the same issue as well. any help is appreciated.