/var/log/messages spammed by many mongod.27017 logs on Satellite6 or Capsule

Solution Verified - Updated

Environment

Red Hat Satellite or Capsule 6.6 - 6.9

Issue

  • since Satellite6.6, /var/log/messages on Sat or Caps contains a huge number of logs like mongod.27017[2114]: [conn312] command .. protocol:op_command 101ms
  • some of the lines have tens of thousands of characters
  • overall the amount of mongod logs to syslog is huge

Is it possible to decrease the amount of logs?

Resolution

Until said otherwise, it is safe to increase the threashold for logging slow operations from default 100ms to 500ms.
One can do so by manual adding to /etc/foreman-installer/custom-hiera.yaml:

mongodb::server::config_data:
  operationProfiling.slowOpThresholdMs: 500

Note: If you are updating multiple parameters, under the same config, you can append the parameter as mentioned in the example:

mongodb::server::config_data:
  operationProfiling.slowOpThresholdMs: 500
  storage.wiredTiger.engineConfig.cacheSizeGB: 6

and running installer:

satellite-installer

This content is not included.The bug was unfortunately closed as WONTFIX

For more KB articles/solutions related to Red Hat Satellite 6.x Pulp 2.0 Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Pulp 2.0-related Issues

Root Cause

Per Content from docs.mongodb.com is not included.this external mongo manual, mongo logs slow operations beyond the given threshold (under given verbosity level that is default on Sat6). Default value of the threshold is 100ms.

Diagnostic Steps

/var/log/messages contains:

Mar 18 15:35:25 pmoravec-sat65-on-rhev mongod.27017[2114]: [conn312] command pulp_database.units_erratum appName: "MongoDB Shell" command: getMore { getMore: 172912036936, collection: "units_erratum" } originatingCommand: { find: "units_erratum", filter: {} } planSummary: COLLSCAN cursorid:172912036936 keysExamined:0 docsExamined:7900 cursorExhausted:1 numYields:63 nreturned:7901 reslen:15332981 locks:{ Global: { acquireCount: { r: 128 } }, Database: { acquireCount: { r: 64 } }, Collection: { acquireCount: { r: 64 } } } protocol:op_command 101ms

or a HUGE long line:

Mar 18 19:42:42 pmoravec-sat65-on-rhev mongod.27017[2114]: [conn64] command pulp_database.units_rpm command: find { find: "units_rpm", filter: { _id: { $in: [ "8ccac41b-f134-43ac-a250-e851ae0a7dc6", "c337d3f8-6a8b-43d8-858d-712a953ea6f5", .. .. .. "d6805d6d-5c80-4d2b-83d3-9f8a1dd0d513" ] } }, projection: { release: 1, epoch: 1, version: 1, arch: 1, name: 1 }, noCursorTimeout: true } planSummary: IXSCAN { _id: 1 } cursorid:216380936804 keysExamined:199 docsExamined:101 numYields:12 nreturned:101 reslen:16137 locks:{ Global: { acquireCount: { r: 26 } }, Database: { acquireCount: { r: 13 } }, Collection: { acquireCount: { r: 13 } } } protocol:op_query 287ms

or many similar.

SBR
Product(s)
Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.