Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58051

Mongod.exe does not release file handles on rotated logs on windows 10

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.3, 4.4.9, 5.1.0-rc0
    • Affects Version/s: 4.4.5, 4.4.6
    • Component/s: None
    • Environment:
      OS: Windows 10 20H2

    • Fully Compatible
    • ALL
    • v5.0, v4.4
      • Install mongodb community server version 4.4.x (tested with 4.4.0, 4.4.5, 4.4.6).
      • Issue command: db.adminCommand({ logRotate: 1 })
      • Check file handles for mongod process with resmon.exe (see screenshot)
    • Security 2021-07-26, Security 2021-08-09

      I found that mongod.exe does not release file handles to rotated log files beginning with mongo version 4.4.0. 

      This is a problem because I am not able to delete old rotated logs any more with nodejs or any other tool that aquires file handles with SHARED flags.

            Assignee:
            sergey.galtsev@mongodb.com Sergey Galtsev (Inactive)
            Reporter:
            patrick.soboljew@gmail.com Patrick Dawson
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: