Persistent volume not mounting at boot (service: sun-travel-marketing-cloud)
stefyai73-hue
HOBBYOP

24 days ago

The service "sun-travel-marketing-cloud" has a volume attached ("sun-travel-marketing-cloud-volume", Mount Path = /data), confirmed visible and correctly configured in the dashboard. The environment variable DATA_DIR=/data is set correctly on the service.

The problem: at every container boot, the volume is NOT actually mounted — the application ends up writing to the container's ephemeral disk instead of the volume, and the data (generated images, media files) is lost on the next restart.

We added an internal check in the application that verifies at every boot whether /data is on a different filesystem than the container root (the sign of a real mount) and sends an alert if it isn't. Result: the mount FAILED on 5 out of 5 consecutive attempts, across every scenario we tested:

  1. Normal deploy (code push) — failed
  2. Normal deploy (second test) — failed
  3. Normal deploy (third test) — failed
  4. Redeploy IMMEDIATELY after manually detaching and re-attaching the volume — failed
  5. Simple Restart (no code change) — failed

We also confirmed data loss empirically: a media file that was generated and verified on disk disappeared (404) after a subsequent redeploy.

Could you please check whether the volume is actually bound to this service at the infrastructure level, or whether there's a known issue with volume mounting for our project/region?

Service name: sun-travel-marketing-cloud

Volume name: sun-travel-marketing-cloud-volume

Configured Mount Path: /data

Solved

1 Replies

Railway
BOT

24 days ago

The volume's mount path has a trailing space character - it is configured as /data (with a space after "data") instead of /data, so the volume mounts at a different path than where your application writes. To fix this, go to the volume settings in your dashboard, edit the mount path to remove the trailing space so it reads exactly /data, save, and redeploy.


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