503 Service Unavailable

Getting 503 Service Unavailable even though #🚨|incidents says the issue is resolved
49 Replies
Percy
Percy9mo ago
Project ID: 3b58a837-a508-4969-a318-7c37050d177e
sebastiantf
sebastiantfOP9mo ago
3b58a837-a508-4969-a318-7c37050d177e
Adam
Adam9mo ago
are you still running into this issue?
sebastiantf
sebastiantfOP9mo ago
yes wasnt seeing any new logs on railway dashboard since around 8hrs ago. the dashboard isnt loading anymore rn either
Adam
Adam9mo ago
have you restarted your service?
pikachu
pikachu9mo ago
restarting the service worked for us, but sucks we had to wake up this morning and manually restart it
sebastiantf
sebastiantfOP9mo ago
no. trying now restarting fixed production env staging still 503s
sebastiantf
sebastiantfOP9mo ago
seeing this error on staging
No description
sebastiantf
sebastiantfOP9mo ago
trying using external db url instead of internal yeah that fixed it for now. not sure about the internal url
Brody
Brody9mo ago
wanna open another help thread for the failed lookup issue?
sebastiantf
sebastiantfOP9mo ago
would love to, but gonna be hard for us to test it out because our build+deploy somehow takes around 10mins 💀
Brody
Brody9mo ago
what kind of app is it?
sebastiantf
sebastiantfOP9mo ago
koajs (express) backend api
Brody
Brody9mo ago
how big is the image?
sebastiantf
sebastiantfOP9mo ago
2.642GB
Brody
Brody9mo ago
that is a very large image, do you have any idea on what makes it so big?
sebastiantf
sebastiantfOP9mo 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
Brody
Brody9mo ago
isolated or shared?
sebastiantf
sebastiantfOP9mo ago
wdym?
Brody
Brody9mo ago
is it an isolated or shared monorepo?
sebastiantf
sebastiantfOP9mo ago
not entirely sure. looking at the docs rn its shared
Brody
Brody9mo ago
can you link me to the docs?
sebastiantf
sebastiantfOP9mo ago
i meant the railway docs: https://docs.railway.app/guides/monorepo#deploying-an-isolated-monorepo there are packages being shared bw backend & frontend subrepos. so its a shared monorepo
Brody
Brody9mo ago
nx, turbo, workspaces. what kind of shared monorepo?
sebastiantf
sebastiantfOP9mo ago
pnpm workspaces + turbo
Brody
Brody9mo ago
are you making sure to only install the deps that one particular app needs?
sebastiantf
sebastiantfOP9mo ago
not entirely sure. havent gotten around to debugging it yet
Brody
Brody9mo ago
what kind of deps does the backend require? anything heavy like chrome?
sebastiantf
sebastiantfOP9mo ago
nah nothing too big like that. typical backend deps like nodemon, test runners, ts, bullmq, koa, typeorm etc.
Brody
Brody9mo ago
how long does railway say it takes to build your app? this would be printed in the build logs
sebastiantf
sebastiantfOP9mo ago
Build time: 245.90 seconds
Build time: 245.90 seconds
4 min 5.9 s but in total i think i've seen around 8mins from build trigger
Brody
Brody9mo ago
so publishing the image is whats taking the longest
sebastiantf
sebastiantfOP9mo ago
yeah seems like it
Brody
Brody9mo ago
make sure you arent installing unnecessary packages, and it will likely cut down both times
sebastiantf
sebastiantfOP9mo ago
hmm got it. is there any way we could replicate the image build in local?
Brody
Brody9mo ago
i assume you are using nixpacks on railway right?
sebastiantf
sebastiantfOP9mo ago
yea
Brody
Brody9mo ago
you can use nixpacks locally too then! https://nixpacks.com/docs/install 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
sebastiantf
sebastiantfOP9mo ago
hmm. yeah that makes sense. will try out the Dockerfile route. Thats easier / familiar too ig Thanks! 🙏
Brody
Brody9mo ago
no problem! and when you do have the build and deploy times down, feel free to open a thread for that lookup error!
sebastiantf
sebastiantfOP9mo ago
yup. will do prolly spin up another instance and test on there
Brody
Brody9mo ago
sounds good
sebastiantf
sebastiantfOP9mo ago
Hey 👋 what happens if i provide a dockerfile and a buildCommand as well? wanted to confirm whether the build environment also takes in the same configured environment variables? is it okay to run test suites during the build? or is railway considered a deployment only system?
Brody
Brody9mo 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.
sebastiantf
sebastiantfOP9mo ago
Makes sense. Thanks. 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
Brody
Brody9mo ago
both dont charge for build
sebastiantf
sebastiantfOP9mo ago
Wondering More about the total time taken from push to deploy, not so much about charging Guess no way around it tho
Brody
Brody9mo ago
it indeed would take longer
sebastiantf
sebastiantfOP9mo ago
Yup
Want results from more Discord servers?
Add your server