Concurrent builds of the same code frequently fail
jamiemufu
PROOP

a month ago

When building production and staging the same time or staging and staging2 etc concurrently (exact same code) I get frequent build failures. Manually triggering a rebuild fixes the problem, but its becoming annoying at this point.

Code is the same, Code is being built and deployed to different environments and I get failure on one of the environments

https://railway.com/project/d30fd09b-4b8a-40bd-bf0c-78d575e1e2f6/service/8431d465-0543-4abd-95de-8f2573b1194d?environmentId=e82ed456-4657-44a8-8e67-1aa3b4cf3fc4

https://railway.com/project/d30fd09b-4b8a-40bd-bf0c-78d575e1e2f6/service/8431d465-0543-4abd-95de-8f2573b1194d?environmentId=39e5c64f-6f02-4303-9e72-9a403355bfbc

https://railway.com/project/d30fd09b-4b8a-40bd-bf0c-78d575e1e2f6/service/8431d465-0543-4abd-95de-8f2573b1194d?environmentId=b7d6b979-84b6-40da-83f1-c5c6bc522176

$10 Bounty

1 Replies

Status changed to Awaiting Railway Response Railway about 2 months ago


Status changed to Open Railway about 1 month ago


gablecompany
PRO

a month ago

This usually happens when the builds aren’t actually as identical as they seem.

Even if the code is the same, one environment can still fail if something in the build is different, usually env vars, cached dependencies, or some build step that is a little flaky. That also explains why hitting rebuild often fixes it.

I’d start by checking whether staging and production really have the same setup during build, not just the same code.

If they do, then I’d look at Railway’s Skipped Builds feature so it can reuse the same build instead of rebuilding the same commit multiple times.

And if your app needs different values during build for each environment, then the safest fix is probably to build once in CI and deploy that same image everywhere.

So basically, same commit does not always mean same build. Usually it means something in the build input or cache is different.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...