Exit Code
rafchik-dipstick
HOBBYOP
6 months ago
Whats the way to get the reason why my server restarts under bursts, how to get exit code - I can see only app logs, not why docker restarting
2 Replies
Railway
BOT
6 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 502 Connection Dial Timeout
- 🧵 Unexplained Node/NestJS backend restarts with ELIFECYCLE and no JS error – need exit code / native logs
- 🧵 Unable to connect to the registry trying to deploying a private image
If you find the answer from one of these, please let us know by solving the thread!
rafchik-dipstick
HOBBYOP
6 months ago
Found working strategy for me - wrap docker like this inside Dockerfile
Wrap node to emit exit code even on hard failures
CMD ["sh", "-c", "node dist/server.js & pid=$!; wait $pid; code=$?; echo \"[WRAPPER] node exited status=$code\" >&2; sleep 1; exit $code"]Status changed to Solved rafchik-dipstick • 6 months ago