a month ago
TLDR
I can't write into my volumes and when I try to put my service to sleep the container never stays alive long enough for me to copy files into it.
The service goes up, prints the sleep, then immediately exits. Every attempt to rsync hits “read-only” / "not running” even though the volume is attached.
What I’m trying to do
Seed a Railway volume from inside the service context (copy /app/analysis/data and /app/analysis/stress_tests/output → /workspace/data/{analysis_data,stress_outputs}), then restore my normal Start Command.
What works
Build succeeds (Nixpacks detects Python).
Service shows Active after deploy with a simple hold command.
What’s broken / confusing
No runtime logs even when the Start Command prints a lot and sleeps:
bash -lc ' set -euo pipefail; set -x echo "[seed] start"; mount | grep workspace || true mkdir -p /workspace/data/analysis_data /workspace/data/stress_outputs rsync -av /app/analysis/data/ /workspace/data/analysis_data/ || cp -R /app/analysis/data/. /workspace/data/analysis_data/ rsync -av /app/analysis/stress_tests/output/ /workspace/data/stress_outputs/ || cp -R /app/analysis/stress_tests/output/. /workspace/data/stress_outputs/ du -sh /workspace/data/analysis_data /workspace/data/stress_outputs || true echo "[seed] sleep"; sleep 600 'Deploy Logs tab shows “No logs in this time range.”
Details shows Deployment successful (Initialization, Build, Deploy all green).
SSH refuses to attach even while the service is Active and running a long
sleep:railway login railway link --project creative-unity railway ssh --service "Daily-Ladder" -> Expected welcome message… "Your application is not running or in a unexpected state"(I also tried selecting the project/env via prompts; same result.)
Running seeding commands locally with
railway run --service …clearly executes on my Mac (no/workspace), so I understand that’s not the right context...I’m trying to run inside the container.
What I’ve already triedDifferent Start Commands: short seeding, verbose seeding with
set -x, and pure hold:bash -lc 'echo "[hold] container up"; sleep 1800'Build goes green → service shows Active. Still no runtime logs; SSH still says “not running”.
Verified
requirements.txtexists at repo root; Nixpacks detects Python; no Dockerfile in use.Re-deployed multiple times (some earlier deploys failed at “create build plan,” later ones succeeded without changes).
What success looks likeUltimately, I am aiming to get scheduled pipelines running cleanly inside Railway. The missing piece is that both services need my repo’s pre-computed parquet files/data available inside their own attached volumes
3 Replies
a month ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
a month ago
Hey, can you provide a bit more context? Are you trying to move that data into a new folder or to another location, such as your PC? From what I've observed, you're attempting to copy from outside your volume, which is /app/analysis. If you're copying into /workspace/data, that will be outside your volume and will simply be erased with every deployment.
Also, about your sleep, just increase it to a really big value like sleep 1000000000.
a month ago
Thanks passos, I figured it out piecing info together from other threadds.
Incase this helps anyone in the future:
The core issue was that my og seeding command tried to write into /workspace/data from outside the running service, which doesn’t persist in Railway. The solution was to run the entire fetch/extract sequence inside the container itself.
I moved all startup logic into short helper scripts that Railway calls. One of which downloads and extracts the dataset archivevia Python directly into the mounted volume.
Will leave this open for now till I wrap up my pipeline.. incase I need any more help.
Status changed to Solved brody • about 1 month ago