Application failed to respond
adnan-012
FREEOP

2 months ago

Application failed to respond at https://playgames-p.up.railway.app/ .

No logs error,no datbase connection error

image.png

All variables assigned properly

Unable to access application

image.png

Solved$10 Bounty

10 Replies

Railway
BOT

2 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 2 months ago


Make sure your URL is mapped to the same port your app is listening on. For the permission error, try to set RAILWAY_RUN_UID=0 in your service variables. The variable NEXT_PUBLIC_APP_URL should start with https not http. Also, your JWT secret, and admin password are leaked now, so you need to change them. It's best not to shate your env variables, as the contain sensitive information.


2 months ago

You just leak your credentials, Please edit your Post and remove the image contains your Variables


You need to map your public URL to 3000 in your service settings > networking.


Can you log the port your app is listening on? I don't see any indication in your logs that your app is up and running. Also, make sure you are listening on PORT instead of hardcoding another value.


2 months ago

Is this screenshot of the Deploy Logs?


2 months ago

It is only show migrate logs, also your deployment status is Completed instead of Active, so it's likely it didn't start the app after running the migrate script, do you put migrate and start command together as start command?

If you do, Try set the migrate command as Pre-deploy Command, and npm run start (or whatever command you use for running the app) as the Start Command


2 months ago

Try check your service settings and scroll to the Build section and make sure it's actually using your Dockerfile


2 months ago

There is, you're put the migrate and start command together as Custom Start Command, you have 2 options to fix it

  1. Wrap your start command in a shell

sh -c "npx prisma db push --accept-data-loss && npx next start"

or 2, move the migrate command to Pre-deploy command


2 months ago

This is how you do it via Config file

{
  "deploy": {
    "preDeployCommand": "npx prisma db push --accept-data-loss",
    "startCommand": "npx next start"
  }
}

2 months ago

The URL you give still return Not Found for me, Is this actually fixed?


Status changed to Awaiting User Response Railway • about 2 months ago


Status changed to Awaiting Conductor Response Railway • about 2 months ago


Status changed to Solved mayori • about 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...