[SERVER-66713] mongos 4.4.12 slow on mongos,but fast on mongod Created: 24/May/22  Updated: 06/Dec/22  Resolved: 08/Jun/22

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

Type: Bug Priority: Major - P3
Reporter: jing xu 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
Operating System: ALL
Participants:

 Description   

hello:
my mongo cluster has three mongos with six shard with three members.
now i find too many slow log on mongos.now has 200000+ every hour.but
just has little slow log on all shards.

but it is still slow.on mongos is 1484ms,but on shard is 1ms.

more mongos.log |grep 1234567
{"t":
 
{"$date":"2022-05-14T13:24:22.449+08:00"}
,"s":"I", "c":"COMMAND", "id":51803,
"ctx":"conn587389","msg":"Slow query","attr":{"type":"command","ns":"xiaoxu.orderMail",
"command":{"find":"OrderMail","filter":{"$and":[
 
{"mailNo":"1234567"}
,{"createTime":{"$gte":
 
{"$date":"2022-04-14T05:24:20.968Z"}
}},
{"createTime":{"$lte":
 
{"$date":"2022-05-15T05:24:20.968Z"}
}}]},"sort":
 
{"createTime":-1}
,
"nShards":1,"cursorExhausted":true,"numYields":0,
"nreturned":0,"reslen":234,"protocol":"op_msg","durationMillis":1484}}

more shard1.log

{"t":
 
{"$date":"2022-05-14T13:24:22.449+08:00"}
,"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn410512","msg":"Slow query",
"attr":{"type":"command","ns":"xiaoxu.OrderMail","command":{"find":"OrderMail","filter":{"$and":[
 
{"mailNo":"1234567"}
,
{"createTime":{"$gte":
 
{"$date":"2022-04-14T05:24:20.968Z"}
}},{"createTime":{"$lte":
 
{"$date":"2022-05-15T05:24:20.968Z"}
}}]},
"sort":
 
{"createTime":-1}
,
"storage":{},"protocol":"op_msg","durationMillis":1}}



 Comments   
Comment by Eric Sedor [ 08/Jun/22 ]

Hi 601290552@qq.com,

For this issue we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums.

If the discussion there leads you to suspect a bug in the MongoDB server, then we'd want to investigate it as a possible bug here in the SERVER project.

Thank you!

Comment by jing xu [ 24/May/22 ]

hello:
my mongo cluster has three mongos with six shard with three members.
now i find too many slow log on mongos.now has 200000+ every hour.but
just has little slow log on all shards.

but it is still slow.on mongos is 1484ms,but on shard is 1ms.
more mongos.log |grep 1234567
{"t":

{"$date":"2022-05-14T13:24:22.449+08:00"}

,"s":"I", "c":"COMMAND", "id":51803,
"ctx":"conn587389","msg":"Slow query","attr":{"type":"command","ns":"xiaoxu.orderMail",
"command":{"find":"OrderMail","filter":{"$and":[

{"mailNo":"1234567"}

,{"createTime":{"$gte":

{"$date":"2022-04-14T05:24:20.968Z"}

}},
{"createTime":{"$lte":

{"$date":"2022-05-15T05:24:20.968Z"}

}}]},"sort":

{"createTime":-1}

,
"nShards":1,"cursorExhausted":true,"numYields":0,
"nreturned":0,"reslen":234,"protocol":"op_msg","durationMillis":1484}}

more shard1.log
{"t":

{"$date":"2022-05-14T13:24:22.449+08:00"}

,"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn410512","msg":"Slow query",
"attr":{"type":"command","ns":"xiaoxu.OrderMail","command":{"find":"OrderMail","filter":{"$and":[

{"mailNo":"1234567"}

,
{"createTime":{"$gte":

{"$date":"2022-04-14T05:24:20.968Z"}

}},{"createTime":{"$lte":

{"$date":"2022-05-15T05:24:20.968Z"}

}}]},
"sort":

{"createTime":-1}

,
"storage":{},"protocol":"op_msg","durationMillis":1}}

Generated at Thu Feb 08 06:06:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.