On Wednesday, 23 March 2016 07:17:35 UTC+11, Chris De Bruyne wrote:
As far as I know there is no way to get the longer queries in your log files. The limit is 10K per line, which is huge, let’s be honest.
Hi Chris, Dennis,
A belated answer for the archives :).
There isn’t a setting to increase the log line limit (nor is that likely to be particularly useful), however there are several approaches that can be helpful to understand changes in query traffic:
Use the $comment
meta-operator to tag your queries.
As suggested by Chris, mtools
is helpful for log analysis. Aside from mplotqueries
, there is also mloginfo --queries
which tries to aggregate queries by shape.
Use a comprehensive monitoring solution (eg MongoDB Cloud Manager) to capture a historical baseline of activity. The size of queries is one possibility for increased network traffic, but there are many other likely candidates such as increased operations, queries returning large result sets (backup? initial sync?), changes in cluster topology (perhaps chained replication if you have a distributed deployment), etc.
For some helpful background on investigating performance issues, I would recommend watching Asya’s presentation on Diagnostics and Debugging.
Regards,
Stephen