MongoDB OutOfDiskSpace

matwes
HOBBYOP

19 days ago

Hi! It's my first topic here. I started deploying my app on railway month ago with trial plan. NestJS app + mongo database using template "Mongo Express". After some time I realized my db has no indexes that I have in my schema definition. When I tried forcing index creation on app bootstrap:

  for (const [name, model] of Object.entries(connection.models)) {
     await model.syncIndexes();
     console.log(`Indexes synced for model: ${name}`);
  }

my build crashed:

MongoServerError: available disk space of 226643968 bytes is less than required minimum of 524288000

errmsg: 'available disk space of 226643968 bytes is less than required minimum of 524288000',

at Connection.sendCommand (/app/node_modules/mongodb/lib/cmap/connection.js:305:27)

at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

at async Connection.command (/app/node_modules/mongodb/lib/cmap/connection.js:333:26)

at async Server.command (/app/node_modules/mongodb/lib/sdam/server.js:171:29)

codeName: 'OutOfDiskSpace'

}

First I thought it's about trial plan but today I moved to hobby plan and I've got the same error. Where can I increase volume storage of my db?

Solved

1 Replies

Railway
BOT

19 days ago

Hello,

You were on the trial plan when you deployed your MongoDB database, and thus, your volume was limited to 500MB. Unfortunately, MongoDB can not happily run with only 500MB of storage forever.

Since you have now upgraded to the Hobby plan, go into the volume settings to grow it to 5GB.

Best,
[Your Name]


Status changed to Awaiting User Response Railway 19 days ago


Status changed to Solved matwes 19 days ago


Loading...
MongoDB OutOfDiskSpace - Railway Help Station