502 Bad Gateway On Api Access

We get the error below sometimes while we access data using the API

502 Bad Gateway

502 Bad Gateway


nginx/0.7.65
Any ideas what could be the reason. we are hosted on VPS with 6 CPU / 5GB RAM

We get the error below sometimes while we access data using the API

502 Bad Gateway

502 Bad Gateway


nginx/0.7.65
Any ideas what could be the reason. we are hosted on VPS with 6 CPU / 5GB RAM

502 is a server error. We recommend you to contact your server administrator regarding this.

If you have a dedicated or VPS the NGINX logs are usually at:

access_log /var/log/nginx/whatever-site-name-is.access.log main;
error_log /var/log/nginx/whatever-site-name-is.error.log;

If you do not have a VPS or dedicated server and are running ecommerce .. you really should get one.