My worker is not operating as expected
mitchforest
PROOP

3 hours ago

  • Worker service status still reports:

    - status: SUCCESS

    - stopped: false

    - numReplicas: 1

    - start command: bun --cwd=apps/api run

      start:worker
    • But railway ssh --service worker --environment

      production ... fails with:

      Error: Your application is not running or in a

      unexpected state.

Awaiting User Response$20 Bounty

2 Replies

Railway
BOT

3 hours ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway about 3 hours ago


Your container may not have a shell available. Railway's SSH feature requires either /bin/bash or /bin/sh to exist in your container, as it doesn't use traditional SSH but rather a WSS based connection that spawns a shell process.


That moderator answer is probably the right direction. status: SUCCESS / stopped: false only means the worker process is up; Railway SSH still needs a shell inside the image.

Since you’re using Bun, check whether the final image is minimal/distroless and missing /bin/sh:

command -v sh || command -v bash

If that returns nothing, add a shell to the runtime image, e.g. apk add --no-cache bash on Alpine, or switch to a base image that includes /bin/sh.

Also worth checking the worker logs for a simple startup heartbeat, just to confirm the Bun process is not forking and then leaving Railway with something odd. But for this specific railway ssh error, shell availability is the first thing I’d fix.


Status changed to Awaiting User Response Railway 35 minutes ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...