503 Service Unavailable

AnonymousTRIAL

a year ago

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

0 Replies

AnonymousTRIAL

a year ago

3b58a837-a508-4969-a318-7c37050d177e


a year ago

are you still running into this issue?


AnonymousTRIAL

a year ago

yes


AnonymousTRIAL

a year ago

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


a year ago

have you restarted your service?


kevjinHOBBY

a year ago

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


AnonymousTRIAL

a year ago

no. trying now


AnonymousTRIAL

a year ago

restarting fixed production env
staging still 503s


AnonymousTRIAL

a year ago

seeing this error on staging

1215702069332418800


AnonymousTRIAL

a year ago

trying using external db url instead of internal


AnonymousTRIAL

a year ago

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


a year ago

wanna open another help thread for the failed lookup issue?


AnonymousTRIAL

a year ago

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


a year ago

what kind of app is it?


AnonymousTRIAL

a year ago

koajs (express) backend api


a year ago

how big is the image?


AnonymousTRIAL

a year ago

2.642GB


a year ago

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


AnonymousTRIAL

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


a year ago

isolated or shared?


AnonymousTRIAL

a year ago

wdym?


a year ago

is it an isolated or shared monorepo?


AnonymousTRIAL

a year ago

not entirely sure. looking at the docs rn


AnonymousTRIAL

a year ago

its shared


a year ago

can you link me to the docs?


AnonymousTRIAL

a year ago


AnonymousTRIAL

a year ago

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


a year ago

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


AnonymousTRIAL

a year ago

pnpm workspaces + turbo


a year ago

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


AnonymousTRIAL

a year ago

not entirely sure. havent gotten around to debugging it yet


a year ago

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


AnonymousTRIAL

a year ago

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


a year ago

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


AnonymousTRIAL

a year ago

Build time: 245.90 seconds

AnonymousTRIAL

a year ago

4 min 5.9 s


AnonymousTRIAL

a year ago

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


a year ago

so publishing the image is whats taking the longest


AnonymousTRIAL

a year ago

yeah seems like it


a year ago

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


AnonymousTRIAL

a year ago

hmm got it.


AnonymousTRIAL

a year ago

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


a year ago

i assume you are using nixpacks on railway right?


AnonymousTRIAL

a year ago

yea


a year ago

you can use nixpacks locally too then!


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


AnonymousTRIAL

a year ago

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


AnonymousTRIAL

a year ago

Thanks! 🙏


a year ago

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


a year ago

!


AnonymousTRIAL

a year ago

yup. will do


AnonymousTRIAL

a year ago

prolly spin up another instance and test on there


a year ago

sounds good


AnonymousTRIAL

a year ago

Hey 👋


AnonymousTRIAL

a year ago

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


AnonymousTRIAL

a year ago

as a railway buildCommand or within the docker build?


AnonymousTRIAL

a year ago

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


AnonymousTRIAL

a year ago

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


AnonymousTRIAL

a year ago

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


AnonymousTRIAL

a year ago

is it okay to run test suites during the build?


AnonymousTRIAL

a year ago

or is railway considered a deployment only system?


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


AnonymousTRIAL

a year ago

Makes sense. Thanks.


AnonymousTRIAL

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


a year ago

both dont charge for build


AnonymousTRIAL

a year ago

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


AnonymousTRIAL

a year ago

Guess no way around it tho


a year ago

it indeed would take longer


AnonymousTRIAL

a year ago

Yup


503 Service Unavailable - Railway Help Station