Skip to content
CLI upload interrupted before snapshot: diagnostics for recurrence (recovered)
stephenekwedike
OP

a month ago

Hello Railway team,

Opening a separate topic as requested by your staff. This is a historical CLI upload failure, not a current outage: subsequent authorized staging deployments succeeded. We are asking for recurrence diagnostics, not a redeploy or configuration change.

On September 30, a deployment reported "Failed to create code snapshot" and had no associated build. Your earlier investigation found the upload connection closed with "aborted" while receiving the archive. Storage setup succeeded; gzip decoding, extraction and path validation never ran. The initiating cause remains undetermined, and we are not claiming an archive rejection or size restriction.

CLI version: railway 5.58.0, installed binary. Sanitized command structure (uppercase arguments are redacted placeholders, not literal values):

railway up SOURCE_DIRECTORY --path-as-root --no-gitignore -p PROJECT_ID -e ENVIRONMENT_ID -s SERVICE_ID --detach --json --message DEPLOYMENT_NOTE

The initial uploader had a 600-second subprocess timeout configured, but its raw stdout/stderr, upload exit code and timeout/cancellation outcome were not retained. We cannot say what closed that connection. One controlled retry exited 1 after approximately 6.39 seconds, with no subprocess timeout recorded. Its stderr was empty; stdout content was not retained, only a hash. No new deployment was visible afterward, and your team found no corresponding API request for that retry.

Questions:

  1. Which supported CLI diagnostic flags and fields should we retain on a future single upload attempt to distinguish client cancellation, a network disconnect and an edge timeout?
  2. Is there a safe way to capture the upload request ID, received byte count and timing without exposing credentials?
  3. If you need the existing private technical report and correlation identifiers, how can we provide them privately? "Ask Railway Privately" is disabled in this account's new technical-thread form. Those identifiers and logs are deliberately omitted here. Service is N/A because this public post requests general CLI diagnostic guidance, not access to or changes on a particular service.

No redeploy, production, configuration or billing changes are requested. Thank you.

Solved

1 Reply

Status changed to Awaiting Railway Response Railway • about 1 month ago


chandrika
EMPLOYEE

a month ago

For railway up in that CLI version, the useful flags are --verbose and --json. --verbose prints the project, environment and service IDs plus the archive byte count before the upload starts, and --json returns a structured error with an error message and a code of UPLOAD_FAILED (or, on success, the deployment ID and logs URL). Neither prints credentials, so retaining both streams in full on a single attempt, with the exit code and wall-clock start and end times, is safe.

The upload is one POST of the gzipped archive with no automatic retry, and the CLI's HTTP timeout defaults to 90 seconds, configurable with the RAILWAY_HTTP_TIMEOUT environment variable. Your 600-second subprocess timeout therefore does not extend the upload itself; recording the effective RAILWAY_HTTP_TIMEOUT value alongside the elapsed time lets you tell a client-side HTTP timeout apart from a connection closed earlier. A failure that never reached our side and a rejected upload also produce different error text: rejections carry a server message or status code (for example 413 for an oversized archive), while a dropped connection surfaces as a transport error.

The CLI does not log response headers, so it cannot capture a request ID or a server-side received byte count. The closest client-side signals are the --verbose byte count, the timing, and the exact error text.


Status changed to Awaiting User Response chandrika • about 1 month ago


Railway
BOT

a month 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 • about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...