Hot backup (4.0) creates additional 100 MB journal files every time

Whenever we run hot backup, a new 100 MB journal file appears in /var/lib/mongodb/journal

Then, these journal files get included with subsequent hot backups, so the backup filesize keeps growing and growing (seemingly forever). The only solution we’ve found is to restart the server, which likely isn’t something that’s ideal to do regularly.

Here’s a screenshot. Hot backup was ran 3x recently, and these are the 3 new journal files:

Any suggestions?

Sidenote … is there no way to search these forums? I hope I didn’t ask a duplicate question :slight_smile:

Hello imk thanks for your question, I’ll bring it to the attention of the team.
Meanwhile… we’re working on improving Forum usability, but if you’re on a big screen then you can search the forum by using the search box top right of the screen, and then in the result set click on the FORUMS tab. It’s not ideal I know…

Hello imk, thanks for your question. PSMDB periodically flushes data to the file system. This is controlled by storage.syncPeriodSecs configuration parameter which is by default 60 seconds (see [url]https://docs.mongodb.com/manual/reference/configuration-options/#storage.syncPeriodSecs[/url]).
So if you created several backups and you see several WiredTigerLog files then in 60 seconds those files should disappear (except the latest one). Does this match your observations? If not then please tell which version of PSMDB do you use.

Hi Igor!

We’re running Percona Server for MongoDB server version: v4.0.6-3

Unfortunately it’s been hours and those 3 additional journal files are still in that directory.

So I just tried this: [LIST=1]
[]Added syncPeriodSecs: 60 to mongod.conf
[
]Restarted mongod service
[]Ran hot backup 3 more times (3 new journal files appeared)
[
]Waited 60 seconds
[*]The 3 journal files are gone! Yay!
[/LIST] So it appears that syncPeriodSecs: 60 is NOT a default and there is no default. FYI that config parameter did not exist in mongod.conf.

Thanks so much for your help!