If you’d like to learn more about troubleshooting your application, visit the troubleshoot development page.
Step 1: Check logs for troubleshooting insights
You can start your troubleshooting process by looking into some of the logs listed below:- Deploy logs
Note that the Deploy logs will only populate if the deploy hook runs as part of your deployment.
- App logs
- All available logs
Step 2: Ensure your app’s web start command is running
If you’ve configured aweb.command.start in your ./upsun/config.yaml, make sure:
-
It launches your app process reliably (e.g.
npm start,gunicornetc.) - It doesn’t exit immediately or crash
-
It binds to the port provided by the
PORTenvironment variable
Please note that if the $PORT is empty, you will need to check if
web.upstream.socket_familyis set to tcp.You may see a 502 error if your application isn’t listening at the same place that the runtime is sending requests.Step 3: Review recent activity
Use the Console or CLI to inspect recent deploys and other operations:- In the Console, go to your environment view and select an activity to review.
- Or, in the CLI:
Step 4: SSH into the running container
If the logs aren’t telling the full story, you can directly inspect your running environment with this command:- Viewing log files created by your app that aren’t exposed via the
Upsun log - Checking if writable directories are correctly mounted
- Testing internal service connections and inspecting the filesystem
Bonus step
You can also manually run yourstart command to debug why your app might be failing. This is because some output about issues in standard output (stdout) don’t always appear in the logs.Step 5: Verify service connectivity
If your app uses databases or other services, make sure it can reach them from within the container with the command below:.upsun/config.yaml,services, the top level key and linked correctly in your app configuration.