Can someone help me to understand why the Wiredtiger log files (wiredtigerlog.000000000XX) under the journal folder in one of the replica set is keep adding more files without removing the old one. The server is running out of space because of the this and we extended the memory and within 3 days the space is again full with more wiredtiger log files in the folder.
Pls help me how to restrict the log file and remove the old ones.
Can you provide some additional details:
- OS
- MongoDB Version
- Filesystem type where the journal directory is
- Topology. Standalone/ReplicaSet/Sharded and any Arbiters?
I see the original posted never answered, but I have the same issue.
OS: CentOS 7.9
MongoDB Version: 4.4 (ent)
FS: XFS
Topology: RS
Just to add to above, note the right-side secondary server where the problem happens.
It doesn’t happen on the other two (primary on the left, secondary in the middle) .
The disk free space moves like that because of how many journal files are kept until they are finally deleted.
For whom it may concern that runs into this issue in the future:
After talking to MongoDB support they informed us that this additional journal files (on top of the default last 3) are kept, specifically on the node on which backups are ran, as part of the backup process. They are ‘the journal files from the point in time of the last backup’, if I understood correctly.
This corresponds with the behaviour I am seeing on the server well.