M
M
Multigame2020-12-01 08:18:11
MongoDB
Multigame, 2020-12-01 08:18:11

How to limit MongoDB memory?

Good afternoon.

Found that the mongoDB server behaves very ugly with the RAM on the server. The process gradually eats up the entire amount of free memory. Further, judging by the logs, the restart does not occur, just the memory is released.

In principle, this all works, but leads to brakes at the stage of filling> 90% of RAM.
We tried to limit the amount of RAM consumed through storage.wiredTiger.engineConfig.cacheSizeGB
But the database server refuses to start when this option is set to a value less than 6GB, despite the fact that the server has only 4 GB

db version v3.2.22
db.hostInfo() - returns memSizeMB true ( 4gb)

Is there a solution? Or just update to 3.4+?

storage:
  dbPath: "/db/mongo"
  directoryPerDB: true
  wiredTiger:
    engineConfig:
       cacheSizeGB: 3
  engine: "wiredTiger"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question