10 months ago
Issue:
- App starts: "✓ Ready in 379ms"
Starting Container
> next start
✓ Ready in 379ms
Stopping Container
- No crash or error messages
- Happens with both Docker and Nixpacks
- Another app (end user app) with similar setup works fine
- Memory usage is minimal
- On paid plan
Database : Supabase.
Next.js version: 14.2.30
React version: 18.2.0
NextAuth version: 4.24.5
Prisma version : 6.16.3
Node.js: 20
URL - noble-eagerness-development.up.railway.app
Why is the container being stopped immediately after successful startup? Is there a health check timeout or other policy being enforced?
10 Replies
10 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 Django + Gunicorn container stops immediately after starting
- 🧵 PostgreSQL Deployment Stuck: Repeated "invalid length of startup packet" errors and Healthcheck failing
- 🧵 Telegram bot deployed successfully but shutting down immediately
If you find the answer from one of these, please let us know by solving the thread!
10 months ago
maybe you need the health endpoint?
10 months ago
It works perfectly fine on Vercel. Only Railway has an issue. Tried health end point additions - no effect. Strange.
10 months ago
can you share you start script & your dockerfile? ps. if I click on the link you share I can see the app working
reneu-admin
It works perfectly fine on Vercel. Only Railway has an issue. Tried health end point additions - no effect. Strange.
10 months ago
I can see the URL you shared seems to be working - is it a different URL?
10 months ago
Only the login page is shown - after that I cannot proceed. the server is already down.
reneu-admin
Only the login page is shown - after that I cannot proceed. the server is already down.
10 months ago
Howdy!
Are you using nixpacks, Railpacks, or a Dockerfile to start the service?
10 months ago
Tried both nixpacks and docker. seems to be same result. I am away from my workstation. Once i am back I can share the startup script and dockerfile
reneu-admin
Tried both nixpacks and docker. seems to be same result. I am away from my workstation. Once i am back I can share the startup script and dockerfile
10 months ago
Wonderful that would be helpful! I'd highly suggest sticking just to a Dockerfile as that has the most control.
For when you are back, are you able to share the contents of that Dockerfile alongside a screenshot of the logs for why your service crashes? It should have a reason for the exit and not just a harsh quit.
10 months ago
sure. thanks