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

support interoperability with Linux logrotate

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Logging
    • Labels:
      None

      Description

      Currently mongod doesn't work completely satisfactorily with Linux logrotate.The standard method of allowing logrotate to rename the file doesn't work because mongod continues writing to the open fd of the renamed file instead of to the new file. You can use the "copytruncate" option which causes logrotate to copy the current log file to the rotated file and then truncate the current log file to delete the old entries, but this a) requires that the file be copied instead of just renaming it and b) loses any log entries made between the copy and the truncate.

      This could be fixed if there were some way to force mongod to close the current log file and open it again. Ideally this would be a signal (to simplify using it in a logrotate script), possibly SIGUSR1 with alternate semantics specified by a configuration option.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              bruce.lucas Bruce Lucas
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: