MongoDB 3.6 - Journal files are not getting cleaned up and they keep building everyday and use up a lot of disk space

dba.stackexchange https://dba.stackexchange.com/questions/202007

  •  27-12-2020
  •  | 
  •  

Вопрос

We have recently upgraded to MongoDB 3.6 and since then we have noticed that the journal files keep building up and are not getting cleaned. Due to this, the disk usage keeps growing until there is no space left on the disk.

This issue does not occur with MongoDB 3.4. Is there anyway to enforce cleanup of journal files in MongoDB 3.6?

Update on data volumes:
We process around 148 GB of data every day. The disk space that the MongoDB data files use is around 60 GB. However, the journal files use up additional 70 GB of space everyday. Since the journal files are not getting cleaned up, the total disk space used increases by 70 GB everyday.

Это было полезно?

Решение

This is a known issue recently discovered in the MongoDB 3.6.3 release when using WiredTiger on Windows: SERVER-33982: Unbounded growth of pre-allocated log files.

This issue will be corrected in the 3.6.4 production release, so upgrading to MongoDB 3.6.4 (or newer) when available should resolve the issue.

In the interim, possible workarounds are:

  • Disable WiredTiger preallocation in 3.6.3

    • In your MongoDB config file:

      storage:
        wiredTiger:
          engineConfig:
            configString: log=(prealloc=false)
      
    • Or, via command-line parameter:

      --wiredTigerEngineConfigString=log=(prealloc=false)
      
  • Downgrade to MongoDB 3.6.2

  • Restart your mongod to free up the preallocated space

Другие советы

This issue does not occur with MongoDB 3.4. Is there anyway to enforce cleanup of journal files in MongoDB 3.6?

As you can limit the journal files to adding the smallfiles=truein mongod.conf configuration file. As per @mnemosyn here and MongoDB BOL here.

For further your ref here, here and here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с dba.stackexchange
scroll top