[SERVER-59246] How can we set the MongoDB log rotation policy on Windows Created: 11/Aug/21  Updated: 06/Dec/22  Resolved: 07/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.0.4
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Nandkishor Chavan Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Triage
Participants:

 Description   

We have had MongoDB service running continuously for a couple of months now, and we have observed that the mongo service log size has been increased to more than 5GB. Due to which we are not able to check the log file for troubleshooting purpose. As the new log file gets created only when we restart the service, we want a way to enforce log rotation policy based on daily or log file size limit.
We have tried the solution given in below links, but still not able to resolve this issue.
https://docs.mongodb.com/manual/tutorial/rotate-log-files/
https://serverfault.com/questions/876293/mongo-forcing-a-log-rotation-on-windows
Can we get any suggestions, on this issue? Thanks in advance.



 Comments   
Comment by Edwin Zhou [ 07/Sep/21 ]

Hi ndchavan4289@gmail.com,

Thank you for reporting this behavior and for your patience as we investigate. Please note that the SERVER project is for bugs for the MongoDB server. As this ticket appears to be a problem with your configuration, I will now close this ticket. I encourage you to ask our community by posting on the MongoDB Developer Community Forums for further assistance troubleshooting. If your discussion there leads you to believe that you've come across a bug in the MongoDB server, please let us know and we will be happy to reopen this ticket and further investigate.

Best,
Edwin

Generated at Thu Feb 08 05:46:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.