Space quota does not match Storage Size

Hi everyone,
I’m getting the error com.mongodb.MongoCommandException: Command failed with error 8000 (AtlasError): 'you are over your space quota, using 512 MB of 512 MB when using Kafka connector against Mongodb Atlas, but actually, the storage size of my database is 80,93MB and the total indez size is 15,79MB.
Can anyone help me? thanks in advance

Hi @Laura_Fernandez,

The storage quotas for free and shared clusters are based on summing the dataSize and indexSize for all databases: How does Atlas calculate storage limits for shared clusters (M0, M2, M5)?.

You can confirm current usage via the “Data Size” chart for a cluster in the Atlas UI or using the db.stats() command in the MongoDB shell.


Useless reply.

This is my db.stats() result:

  "db": "myFirstDatabase",
  "collections": 10,
  "views": 0,
  "objects": 932195,
  "avgObjSize": 528.4847633810523,
  "dataSize": 492650854,
  "storageSize": 799703040,
  "totalFreeStorageSize": 0,
  "numExtents": 0,
  "indexes": 18,
  "indexSize": 1058549760,
  "indexFreeStorageSize": 0,
  "fileSize": 0,
  "nsSizeMB": 0,
  "ok": 1

dataSize + indexSize = 1.4 GB.
But I still received error:

MongoError: you are over your space quota, using 2048 MB of 2048 MB

My cluster is M2