Build Prioritization
daniel
PROOP

5 hours ago

Hi team, builds from our PR environments often fill the build queue and seemingly delay deploys to our staging and production environments. This is just my observation and may not actually be how things are working under the hood, but I just want to ensure that production builds are never waiting unnecessarily.

Can someone confirm how this works for me? If not, please consider this a request for prioritized builds!

Awaiting User Response

5 Replies

Status changed to Awaiting Railway Response Railway • about 5 hours ago


5 hours ago

Your observation is right. Build and deploy concurrency is shared across the whole workspace, and Pro allows 10 at once. Once those slots are full, new deployments wait in QUEUED and are released in the order they arrived, so a production or staging deploy queued behind a burst of PR environment builds waits its turn. There is no per-environment priority today.

The usual reason PR environments fill the queue is that, with "focused PR environments" turned off in the project settings, each PR environment is a full copy of the base environment. A push to a tracked branch then rebuilds that service in every open PR environment at once. Turning on focused PR environments makes each one deploy only the services its changed files affect, and setting watch paths on each service stops pushes from rebuilding services whose files did not change.

It also helps to delete PR environments for closed or merged PRs. Existing PR environments keep all their services and keep rebuilding on pushes until they are deleted.


Status changed to Awaiting User Response Railway • about 5 hours ago


brody

Your observation is right. Build and deploy concurrency is shared across the whole workspace, and Pro allows 10 at once. Once those slots are full, new deployments wait in QUEUED and are released in the order they arrived, so a production or staging deploy queued behind a burst of PR environment builds waits its turn. There is no per-environment priority today. The usual reason PR environments fill the queue is that, with "focused PR environments" turned off in the project settings, each PR environment is a full copy of the base environment. A push to a tracked branch then rebuilds that service in every open PR environment at once. Turning on focused PR environments makes each one deploy only the services its changed files affect, and setting watch paths on each service stops pushes from rebuilding services whose files did not change. It also helps to delete PR environments for closed or merged PRs. Existing PR environments keep all their services and keep rebuilding on pushes until they are deleted.

daniel
PROOP

4 hours ago

Got it- thanks for the quick response!

  • We have focused PRs enabled
  • We did have to clear out our own closed/merged PRs last week, but for the most part they close themselves out

Are there any plans to prioritize non-PR environment builds over PR builds?


Status changed to Awaiting Railway Response Railway • about 4 hours ago


4 hours ago

We don't have a timeline we can share for environment-based build priority, so for now queued builds still run in the order they arrive across the whole workspace.

With focused PR environments already on, watch paths on each service are the remaining lever, since they stop a push from rebuilding services whose files didn't change, in PR environments and in staging and production.


Status changed to Awaiting User Response Railway • about 4 hours ago


daniel
PROOP

2 hours ago

Got it- as an alternative, is there a good way to create PRs that don't trigger creation of PR environments in Railway? We have a team of 5 engineers and this issue pops up for us like once a week, so I'm curious how other teams handle this


Status changed to Awaiting Railway Response Railway • about 2 hours ago


2 hours ago

There isn't a per-PR way to opt out today. Draft PRs, labels, and title or branch naming don't change whether a PR environment gets created.

The controls are project-wide, under Project Settings → Environments. The PR environments toggle turns creation on or off for the whole project, and the separate Enable Bot PR Environments toggle controls whether PRs opened by bots like Dependabot, Renovate, or coding agents get environments. If bot PRs are part of your weekly bursts, turning that toggle off keeps human PRs covered and cuts the bot ones.

The environments docs cover both settings.


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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...