container stops with npm error signal SIGTERM even after successful start
tharusha01
PROOP

3 months ago

I’m deploying a Node.js/Express backend to Railway. The service starts fine, passes /api/health, connects to Postgres, and initializes Socket.IO. Right after the health check succeeds, Railway stops the container and npm logs npm error signal SIGTERM / command sh -c node dist/app.js. I already implemented graceful shutdown handlers (clearing intervals, closing Socket.IO, DB, etc.), so the signal itself isn’t fatal—it’s Railway sending SIGTERM. I’m trying to figure out why Railway is terminating the container right away.

Attachments

Solved$10 Bounty

2 Replies

Railway
BOT

3 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


yeeet
PRO

3 months ago

is your health check passing locally, and in your deployment tabs, can you deploy your latest commit (CMD + K -> "Deploy Latest Commit)?


Status changed to Solved tharusha01 3 months ago


Loading...