Skip to content
Sandbox bulk upload fails with CLI 5.71.0 and sandboxExec
thekriek
OP

25 days ago

Please help us identify a supported way to upload an offline application package into a sandbox using an existing Railway CLI login.

Authentication, sandbox creation, small HTTP commands and sandbox destruction work. The tests used synthetic data only, with no customer data or recovery secrets. All test sandboxes are confirmed destroyed.

Two transfer attempts failed:

  1. CLI 5.71.0 sandbox exec with binary stdin exited 1 before package hash verification. Our wrapper did not retain the original stderr, so the cause is unknown. We have corrected that logging omission.
  2. On 26 October 2026 at 17:46:56 UTC, sandboxExec returned data:null and “Problem processing request” for the first 80 KiB raw chunk encoded into a shell command. Trace: 3445562310147404679. Small receiver initialization had succeeded. No chunk acknowledgment was returned; we stopped and destroyed the sandbox rather than retrying an uncertain operation.

The command was approximately 113 KB. A similarly sized read-only GraphQL query succeeded, but we understand that does not establish sandboxExec's command-size limit or explain the failure.

Could you inspect the trace and confirm:

  • What caused this rejection, and what are the supported sandboxExec command/body limits?
  • What is the supported bulk host-file upload route using an existing CLI login?
  • If SDK files.write is required, is there a supported authorization handoff that does not require extracting stored OAuth tokens or creating another long-lived credential?

Please use the retained trace where possible. We are not authorising further paid experiments or changes to our existing services.

Solved

3 Replies

Status changed to Awaiting Railway Response Railway • 25 days ago


dizzydes90
EMPLOYEE

25 days ago

The 17:46:56 UTC sandboxExec failed because the command was too large for the exec channel, not because of anything in it. Each sandboxExec call reaches the sandbox as a single WebSocket message, and that channel refuses messages over 32 KiB. Your 113 KB command hit that cap: the connection closed with code 1009 (message too big) about 200 ms in, before any output, and the API surfaced it as "Problem processing request". The same cap applies to data piped on stdin through sandbox exec, which is the likely reason the CLI attempt exited 1 before the hash check. A GraphQL query of similar size succeeds because the cap sits on the exec channel, not on the API request body.

The supported bulk route is SCP or SFTP straight into the sandbox over SSH:

scp ./package.tar sbx::@ssh.railway.com:~/

That authenticates with an SSH public key registered on your Railway account (Account > SSH Keys), so there's no token to extract and no extra long-lived credential; the sandbox id and environment id are the ones you already pass to sandboxExec, and the same target works with ssh to run the hash verification once the file is in place. That route is the supported hand-off, so you don't need files.write or a second credential for this.


Status changed to Awaiting User Response Railway • 25 days ago


thekriek
OP

24 days ago

Thanks for identifying the 32 KiB exec-channel limit. Our current execution environment cannot resolve ssh.railway.com, so we cannot use SSH from it. Could you clarify:

  1. Is there a supported HTTPS/WSS bulk-upload route that uses the existing CLI login, without extracting stored OAuth tokens, creating another long-lived credential, or registering an SSH key?
  2. If bounded stdin or repeated sandboxExec calls are supported, is the 32 KiB limit per WebSocket message or frame, does it include protocol/encoding overhead, and what chunk size and acknowledgment mechanism do you recommend? Does CLI 5.71.0 split stdin safely, or can it send an oversized message?
  3. If SSH/SFTP is the only supported route, please provide the complete target syntax in a fenced code block (the posted example currently renders as sbx::@ssh.railway.com) and an authoritative source for the SSH host-key fingerprints.

Please answer from documentation or the existing trace. We are not authorising new paid tests, resources, credentials or account-access changes. No customer data is involved.


Status changed to Awaiting Railway Response Railway • 24 days ago


dizzydes90
EMPLOYEE

24 days ago

There is no HTTPS-only bulk upload route. Every file transfer path (SDK files.write, railway sandbox exec with piped stdin, and SCP or SFTP) goes through ssh.railway.com (port 2226 for the SDK and CLI exec channel, port 22 for SSH), so none of them work from a network that cannot resolve that host. That also explains the CLI attempt, and corrects our earlier line about it: railway sandbox exec dials ssh.railway.com:2226 itself and exits 1 when that connection fails, and it chunks piped stdin at 8 KiB, so it never sends an oversized message.

The one path that stays on backboard.railway.com is the sandboxExec mutation, and railway api --file exec.graphql --variables @vars.json runs it with your existing CLI login, with no token extraction. The 32 KiB cap is per WebSocket message as we forward it: the command is wrapped in a JSON envelope plus about 200 bytes of shell prefix, so keep each command under 30 KB. Appending 16 KiB of raw data per call as base64, then one sha256sum call at the end, fits. Each mutation is synchronous, so its exitCode and stdout are the acknowledgment; the default per-call timeout is 2 minutes.

For SSH, the target is:

scp ./package.tar sbx:<environmentId>:<sandboxId>@ssh.railway.com:~/

We don't publish host key fingerprints: ssh.railway.com is served by multiple hosts, each with its own key, and those change without notice. Allowlisting ssh.railway.com on ports 2226 and 22 restores every documented route.


Status changed to Awaiting User Response Railway • 24 days ago


Railway
BOT

17 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 • 17 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...