[SERVER-37028] Rotate Log does not work Created: 06/Sep/18  Updated: 25/Oct/18  Resolved: 25/Oct/18

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

Type: Bug Priority: Major - P3
Reporter: Kai Jie Chang Assignee: Ramon Fernandez Marina
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

One of our secondary mongodb(R-and-W) log file goes too big.

For unknown reasons, the daily rotate log file script failed for a while and we don't know it.

We manually ran 

db.adminCommand( { logRotate : 1 } )

but it did not work.

How to solve this issue without reboot instance?

 

Thank you.

KaiJie

=======================================

 
PsharedconcertoReplSet:SECONDARY> db.adminCommand( { logRotate : 1 } )
 
{
 
 "ok" : 0,
 
 "errmsg" : "",
 
 "operationTime" : Timestamp(1536248863, 2),
 
 "$clusterTime" : {
 
 "clusterTime" : Timestamp(1536248863, 2),
 
 "signature" : {
 
 "hash" : BinData(0,"i/UgZdvD4xEeOJMRDtYoRp6CQgQ="),
 
 "keyId" : NumberLong("6558728512000229524")
 
 }
 
 }
 
}



 Comments   
Comment by Ramon Fernandez Marina [ 06/Sep/18 ]

Can you please upload the logs during the time when you execute logRotate to see what the server says? For example, from your shell (assuming you're running linux):

echo 'db.adminCommand( { logRotate : 1 } )' | mongo
tail -n 1000 [PATH TO mongod.log] > partial_log

and send us partial_log?

Also, have you tried sending SIGUSR1 to your mongod process?

Thanks,
Ramón.

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