[SERVER-59153] slow queries on mongos Created: 06/Aug/21  Updated: 31/Jan/22  Resolved: 31/Jan/22

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

Type: Question Priority: Major - P3
Reporter: h jy Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive mongo.zip    
Participants:

 Description   

Hi,support !

    We find the slow queries about  below(these queries all use shard key filter , and i tried to adjust wt cache lower(to decrease io usage) ,but did't work, i provide logs ,diag data  and i need you to help me reslove the issue):

//2021-08-06T18:14:39.413+0800 I COMMAND  [conn283674] command dmsBik4Bos.bik4bos command: find { find: "bik4bos", filter: { bikeNo: "7780170950" }, projection: { bizType: 1, rideStatus: 1, bikeType: 1, pos.lat: 1, pos.lng: 1, pos.type: 1, pos.timeStamp: 1, alert: 1, alertMsg: 1, lock: 1, licensePlateNo: 1, lastMaintainTime: 1, serviceAreaId: 1, zeroBatteryScanCount: 1, smallAreaId: 1, rackDeployTime: 1, manualLabel: 1, manualLabelMsg: 1, fault: 1, faultMsg: 1, cityGuid: 1, modelGuid: 1, largeBatteryPercent: 1, opFaultCheck: 1, bikeNo: 1, lockVersion: 1, bigAreaId: 1, siteId: 1, opFault: 1, gridId: 1, opStatus: 1, licensePlateType: 1, lastScanUser: 1 }, limit: 1, singleBatch: true, $db: "dmsBik4Bos", $clusterTime: { clusterTime: Timestamp(1628244877, 3136), signature: { hash: BinData(0, 8BF6B66C9B87883E83465F8833EFAC596C2026FE), keyId: 6962514570933960916 } }, lsid: { id: UUID("a26797f2-7427-471f-9dab-3c2fa649560f") }, $readPreference: { mode: "primaryPreferred" } } nShards:1 cursorExhausted:1 numYields:0 nreturned:1 reslen:1980 protocol:op_msg 1799ms



 Comments   
Comment by Eric Sedor [ 18/Oct/21 ]

Hi 18621325186@163.com, are you still experiencing issues here? If so I'd like to suggest upgrading to our latest 4.0 maintenance release, 4.0.27. If the problem still occurs on that version we can dig in further.

Comment by h jy [ 10/Aug/21 ]

Hi, Eric

   Thank you for you replay !  If you analyic the case carefully , you will find the slow logs only be logged on mongos . I  think the slow queries weren't be  only happened on the mongos and weren

be logged on the mongod's log files(and the queries with shard key should be excuted quickly). 

Gratefully

Comment by Eric Sedor [ 09/Aug/21 ]

HI 18621325186@163.com

For this issue, I'd like to ask that you start with our community by posting on the MongoDB Developer Community Forums. The SERVER project is for reporting bugs in the MongoDB server, and the presence of logged slow queries isn't by itself considered a bug.

If the discussion there in the community forums leads you to suspect a bug in MongoDB, that's something we'd want to look into here.

Gratefully,
Eric

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