0

I deployed a container with MongoDB on the server. The container has its own volume where MongoDB data is stored. The database is very small, 6 collections and no more than 40 documents (some removed, some added).

Every time I view the size of the volume, I see it increase (about once in 10 minutes):

520MB   0B (0%)
520.1MB   0B (0%)
520.2MB   0B (0%)

If I make a backup of the database, delete the volume and redeploy the container, the space will be freed up (all database data is intact), the result is:

315.6MB   0B (0%)
315.7MB   0B (0%)
315.8MB   0B (0%)

Why is this happening? The base is very small and almost never used.

This is my result of db.stats(1024 * 1024) command:

{
  db: 'db-name',
  collections: 6,
  views: 0,
  objects: 20,
  avgObjSize: 396.45,
  dataSize: 0.007561683654785156,
  storageSize: 0.1171875,
  indexes: 12,
  indexSize: 0.234375,
  totalSize: 0.3515625,
  scaleFactor: 1048576,
  fsUsedSize: 5094.89453125,
  fsTotalSize: 9740.3203125,
  ok: 1
}
Skip
  • 1
  • 1

0 Answers0