The most common error that you're likely to run into with a Push-deployed app is receiving an NGINX 502 Bad Gateway error. This error suggests that your app's instance is running, however, the application process (the Joystick app) is not currently accessible.

This can happen for a few reasons:
- You've recently deployed a new version of your instance and Push is waiting for your instance to restart the application process.
- You've recently resized your instance and Push is waiting for your instance to restart the application process.
- You've recently restarted your instance and Push is waiting for your instance to restart the application process.
- Push attempted to start your app, but it's internally returning a 5XX error preventing requests from reaching the application's HTTP(S) server.
In the first three cases, this error should be resolved automatically within 30-60 seconds. In the final case, you will need to check the latest logs for your app in the Push dashboard. If nothing looks wrong in the logs that Push has received, start your app up locally on your computer and verify that everything is working as expected. If nothing appears wrong locally, double-check the following:
- Your
settings.production.json
file (orsettings.staging.json
if your deployment environment isstaging
) has the proper settings that your application code expects. - Your instance isn't missing any dependencies (e.g., an NPM or Linux package) that your application needs to run (e.g., Puppeteer).
If everything looks correct, it's possible that there's an issue connecting to your database or another third-party tool or service that your app depends on.
If the problem doesn't resolve itself within a few minutes, it's recommend that you follow the Debugging via SSH guide to log in to your server and investigate issues there.