[SERVER-27212] Allow configuration for "query not recording (too large)" Created: 29/Nov/16  Updated: 06/Dec/22  Resolved: 09/Dec/16

Status: Closed
Project: Core Server
Component/s: Diagnostics, Logging
Affects Version/s: 3.2.11
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Brad Vogel Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23260 Report original query with getMore in... Closed
Related
Assigned Teams:
Query
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Following issue https://jira.mongodb.org/browse/SERVER-5605, we're seeing "query not recording (too large)" when running db.currentOp() to try to track down our slow db queries. It's frustrating not to be able to find the exact query. We're heavy users of Mongo aggregations - some not really even that long in my opinion - but we're finding that all are "too large" to be recorded.

Can a setting be added to override the size that Mongo considers "too large"? We'd use this to make sure most of our queries are recorded using `db.currentOp()` and the slow query log - to help us track down potential issues.



 Comments   
Comment by Brad Vogel [ 09/Dec/16 ]

Thanks!

Comment by James Wahlin [ 09/Dec/16 ]

brad@mixmax.com - I am going to close this ticket given 50kB of query content should in most cases be sufficient to track down the origin. As mentioned, this change is available starting in MongoDB 3.4. If this solution is not sufficient for your use case please feel free to reopen and provide details.

Best,
James

Comment by James Wahlin [ 09/Dec/16 ]

While not configurable, work was done under SERVER-23260 to support writing a partial query to db.currentOp() output. With this change we now:

  1. Check whether the query object is less than 50kB.
    1. If yes, include the object in currentOp output.
    2. If no, write the first 50kB to a string and include the string in currentOp output, with trailing "..." characters to indicate truncation.

This change is available in MongoDB 3.4

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