Skip to content
Three CLI uploads failed at SNAPSHOT_CODE before build — staging deployment blocked
jim00e-shao
OP

22 days ago

Hello Railway Support,

Three deployments to staging failed at SNAPSHOT_CODE before the build started on October 29, 2026.

Project: joyful-charm

Project ID: 2e797825-0ef5-4e39-82de-550a6d7be300

Service: caretide

Service ID: ae245942-a041-4c7e-a22c-895c988534c5

Affected environment: staging

Environment ID: e00dec5a-0b5e-4769-b49a-af68b8621756

Failed deployment IDs:

  1. 8caf98fa-9606-4f19-9c63-a74098ccca04
  2. cbbc89b0-06da-480b-a207-9248574f1245
  3. a531f49f-f2e6-4c3a-b1f1-8a6247c82391

We used Railway CLI 5.62.1 on Windows, uploading an archived source directory with explicit project, environment and service targets.

Each attempt showed "Indexing..." and "Uploading...", followed by "operation timed out". Railway reported:

"Failed to create code snapshot. Please review your last commit, or try again."

All three deployments have no snapshot and no build logs. The third upload was reduced by about 25% to approximately 115 MB uncompressed (2,832 files), but still failed. A previous successful deployment used a similarly sized archive.

The existing staging deployment remains healthy. Production is unchanged. We have stopped retrying.

Could you investigate these snapshot failures and advise on the supported next step?

We also need to deploy this exact commit from a non-default branch to staging only:

854dbd029a45960d9cf4bba2288f8c15d530b7f9

Repository: jim00e-Shao/caretide

Branch: claude/staging-deploy-slim-archive

Both staging and production currently track main. Production's source and deployment triggers must remain unchanged.

Does serviceInstanceDeployV2(serviceId, environmentId, commitSha) support this without changing the stored source or branch association? If not, what is the supported staging-only approach?

Please do not change settings or trigger deployments on our account without our confirmation.

Thank you.

Solved

1 Reply

Status changed to Awaiting Railway Response Railway • 22 days ago


dizzydes90
EMPLOYEE

22 days ago

Hi Jim,

Thanks for the precise write-up. Nothing has been changed or triggered on your account.

The three failures happened during the source upload itself, before any snapshot existed or a build started, which is why those deployments have no snapshot and no build logs. "operation timed out" followed by "Failed to create code snapshot" is what you see when the upload request doesn't complete within 125 seconds: railway up sends the whole archive in one request, and that request has to finish inside Cloudflare's 125-second window. Nothing in your code or the service's configuration is at fault, and the healthy staging deployment is unaffected. A similarly sized archive having worked before just means that upload finished in time; the practical limit is time, not bytes or file count.

To get uploads through reliably, either run railway up from a connection with enough upload bandwidth to finish well inside 125 seconds, or shrink the archive further with a .railwayignore that excludes anything the build regenerates or doesn't need (node_modules or other local dependencies, caches, build output, media that can be fetched at build time). Raising RAILWAY_HTTP_TIMEOUT only changes how long the CLI waits, not the 125-second window.

For deploying commit 854dbd0 to staging only: a service's source settings (repository and branch) are per environment, so in the staging environment you can point caretide's Source at claude/staging-deploy-slim-archive and deploy, and production keeps tracking main untouched; switch staging back to main afterwards if you want it to follow main again. serviceInstanceDeployV2 with a commitSha deploys that commit for the given service and environment without altering the stored source or branch, so it works for a one-off as well, as long as the commit exists in the connected repository.


Status changed to Awaiting User Response Railway • 22 days ago


Railway
BOT

15 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 15 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...