MongoDB keeps crashing
adatlink
HOBBYOP

21 days ago

Unable to start the MongoDB instance. Redeploy doesn't help. Deployment logs attached.

Attachments

Solved$10 Bounty

Pinned Solution

adatlink
HOBBYOP

21 days ago

I figured out the issue by SSH-ing into a deployment where the volume is mounted.

Information about the volume usage on the Metrics tab is wrong. Metrics showed ~300MB from 500MB used, but in fact there was no free space at all on the volume, space was 100% used up. Resizing the volume to 1GB helped, MongoDB now sucessfully starts.

However, Metrics still show volume usage ~300MB from 1GB, altough ~424MB is really used. (Formatted 500MB volume gives that much usable space, 1GB formatted volume gives ~869MB of available storage space.)

7 Replies

Did you hit your size limit(5GB)(check here ...Volume -> Metrics)
Try setting RAILWAY_RUN_UID=0 env variable in your service
more info : https://docs.railway.com/volumes/reference#caveats


adatlink
HOBBYOP

21 days ago

Size limit for the volume is not exceeded (300MB used from 500MB volume). I forgot to mention that it was working perfectly for a few weeks. Then it suddenly crashed a few days ago, could not make it work since.

RAILWAY_RUN_ID=0 was not set before. Added it now but did not help, crashes the same way as before being set.


adatlink

Size limit for the volume is not exceeded (300MB used from 500MB volume). I forgot to mention that it was working perfectly for a few weeks. Then it suddenly crashed a few days ago, could not make it work since.RAILWAY_RUN_ID=0 was not set before. Added it now but did not help, crashes the same way as before being set.

its RAILWAY_RUN_UID=0 ..not just ID



dharmateja

its RAILWAY_RUN_UID=0 ..not just ID

adatlink
HOBBYOP

21 days ago

Right, it's a typo in my previous reply. Setting RAILWAY_RUN_UID=0 doesn't change anything. Also, as I mentioned, it was working without it for weeks.


dharmateja

Also check this https://station.railway.com/questions/mongo-db-not-working-ad53088c

adatlink
HOBBYOP

21 days ago

Thanks. It's a vague description of the issue, but it doesn't seem the same issue I am having. I can execute Restart or Redeploy on the instance, but it doesn't start up. As I can tell from the logs the instance is launched, but start up fails with an ungraceful stop while attempting recovery from the initial crash.


adatlink
HOBBYOP

21 days ago

I figured out the issue by SSH-ing into a deployment where the volume is mounted.

Information about the volume usage on the Metrics tab is wrong. Metrics showed ~300MB from 500MB used, but in fact there was no free space at all on the volume, space was 100% used up. Resizing the volume to 1GB helped, MongoDB now sucessfully starts.

However, Metrics still show volume usage ~300MB from 1GB, altough ~424MB is really used. (Formatted 500MB volume gives that much usable space, 1GB formatted volume gives ~869MB of available storage space.)


Status changed to Solved brody 20 days ago


Loading...