My worker is not operating as expected
mitchforest
PROOP

21 days 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.

Solved$20 Bounty

2 Replies

Railway
BOT

21 days 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 21 days 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.


21 days ago

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 21 days ago


Railway
BOT

14 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 14 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...