Container starts successfully but is immediately stopped with no error

reneu-admin
PROOP

a month 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?

$20 Bounty

10 Replies

Railway
BOT

a month ago


fra
HOBBYTop 10% Contributor

a month ago

maybe you need the health endpoint?


reneu-admin
PROOP

a month ago

It works perfectly fine on Vercel. Only Railway has an issue. Tried health end point additions - no effect. Strange.


fra
HOBBYTop 10% Contributor

a month 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.

I can see the URL you shared seems to be working - is it a different URL?


reneu-admin
PROOP

a month 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.

a month ago

Howdy!
Are you using nixpacks, Railpacks, or a Dockerfile to start the service?


reneu-admin
PROOP

a month 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

a month 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.


reneu-admin
PROOP

a month ago

sure. thanks


Loading...