503 Service Unavailable
Anonymous
TRIALOP

2 years ago

Getting 503 Service Unavailable even though <#846875565357006878> says the issue is resolved

69 Replies

Anonymous
TRIALOP

2 years ago

3b58a837-a508-4969-a318-7c37050d177e


2 years ago

are you still running into this issue?


Anonymous
TRIALOP

2 years ago

yes


Anonymous
TRIALOP

2 years ago

wasnt seeing any new logs on railway dashboard since around 8hrs ago.
the dashboard isnt loading anymore rn either


2 years ago

have you restarted your service?


kevjin
HOBBY

2 years ago

restarting the service worked for us, but sucks we had to wake up this morning and manually restart it


Anonymous
TRIALOP

2 years ago

no. trying now


Anonymous
TRIALOP

2 years ago

restarting fixed production env
staging still 503s


Anonymous
TRIALOP

2 years ago

seeing this error on staging

1215702069332418800


Anonymous
TRIALOP

2 years ago

trying using external db url instead of internal


Anonymous
TRIALOP

2 years ago

yeah that fixed it for now. not sure about the internal url


2 years ago

wanna open another help thread for the failed lookup issue?


Anonymous
TRIALOP

2 years ago

would love to, but gonna be hard for us to test it out because our build+deploy somehow takes around 10mins 💀


2 years ago

what kind of app is it?


Anonymous
TRIALOP

2 years ago

koajs (express) backend api


2 years ago

how big is the image?


Anonymous
TRIALOP

2 years ago

2.642GB


2 years ago

that is a very large image, do you have any idea on what makes it so big?


Anonymous
TRIALOP

2 years ago

yeah thats something in our backlogs to improve the build. havent gotten around to look into it.
we use a monorepo. Not sure if the whole repo is being built in the image


2 years ago

isolated or shared?


Anonymous
TRIALOP

2 years ago

wdym?


2 years ago

is it an isolated or shared monorepo?


Anonymous
TRIALOP

2 years ago

not entirely sure. looking at the docs rn


Anonymous
TRIALOP

2 years ago

its shared


2 years ago

can you link me to the docs?


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

there are packages being shared bw backend & frontend subrepos. so its a shared monorepo


2 years ago

nx, turbo, workspaces. what kind of shared monorepo?


Anonymous
TRIALOP

2 years ago

pnpm workspaces + turbo


2 years ago

are you making sure to only install the deps that one particular app needs?


Anonymous
TRIALOP

2 years ago

not entirely sure. havent gotten around to debugging it yet


2 years ago

what kind of deps does the backend require? anything heavy like chrome?


Anonymous
TRIALOP

2 years ago

nah nothing too big like that. typical backend deps like nodemon, test runners, ts, bullmq, koa, typeorm etc.


2 years ago

how long does railway say it takes to build your app? this would be printed in the build logs


Anonymous
TRIALOP

2 years ago

Build time: 245.90 seconds

Anonymous
TRIALOP

2 years ago

4 min 5.9 s


Anonymous
TRIALOP

2 years ago

but in total i think i've seen around 8mins from build trigger


2 years ago

so publishing the image is whats taking the longest


Anonymous
TRIALOP

2 years ago

yeah seems like it


2 years ago

make sure you arent installing unnecessary packages, and it will likely cut down both times


Anonymous
TRIALOP

2 years ago

hmm got it.


Anonymous
TRIALOP

2 years ago

is there any way we could replicate the image build in local?


2 years ago

i assume you are using nixpacks on railway right?


Anonymous
TRIALOP

2 years ago

yea


2 years ago

you can use nixpacks locally too then!


2 years ago

or if thats not something you are interested in, write up a dockerfile then you can test building an image from that locally and railway will use it too.

tbh you probably should go the Dockerfile route, it will give you by far the most control over your build size


Anonymous
TRIALOP

2 years ago

hmm. yeah that makes sense. will try out the Dockerfile route. Thats easier / familiar too ig


Anonymous
TRIALOP

2 years ago

Thanks! 🙏


2 years ago

no problem! and when you do have the build and deploy times down, feel free to open a thread for that lookup error!


2 years ago

!


Anonymous
TRIALOP

2 years ago

yup. will do


Anonymous
TRIALOP

2 years ago

prolly spin up another instance and test on there


2 years ago

sounds good


Anonymous
TRIALOP

2 years ago

Hey 👋


Anonymous
TRIALOP

2 years ago

I was working on the Dockerfile. I was wondering where I should be running the tests


Anonymous
TRIALOP

2 years ago

as a railway buildCommand or within the docker build?


Anonymous
TRIALOP

2 years ago

Currently we have this: buildCommand = "pnpm run test:backend" in the railway toml


Anonymous
TRIALOP

2 years ago

what happens if i provide a dockerfile and a buildCommand as well?


Anonymous
TRIALOP

2 years ago

wanted to confirm whether the build environment also takes in the same configured environment variables?


Anonymous
TRIALOP

2 years ago

is it okay to run test suites during the build?


Anonymous
TRIALOP

2 years ago

or is railway considered a deployment only system?


2 years ago

the build command in the service settings is unavailable when building with a dockerfile.

the build environment does make all your service variables available.

test suites would best be done in github, and then you can have railway wait for those to pass / fail before deploying.


Anonymous
TRIALOP

2 years ago

Makes sense. Thanks.


Anonymous
TRIALOP

2 years ago

The thing about running the tests in GitHub is this:
The build happens once on GitHub for running the tests. Then it happens again at railway


2 years ago

both dont charge for build


Anonymous
TRIALOP

2 years ago

Wondering More about the total time taken from push to deploy, not so much about charging


Anonymous
TRIALOP

2 years ago

Guess no way around it tho


2 years ago

it indeed would take longer


Anonymous
TRIALOP

2 years ago

Yup


Loading...