简体   繁体   中英

Why system.profile collection is not updated in mongodb?

I have enabled profiling for mongodb cluster with 3 servers by using below configuration: operationProfiling: mode: all slowOpThresholdMs: 200 slowOpSampleRate: 0.98

  1. Only 50 entries are visible in system.profile collection. After couple of hours, there are no more updates. Current size of collection:1.5 KB, default is 1MB. What could be possible reasons for this and how i can find the root cause?

2.In a replica of three, I am able to run queries against profile collection only on primary server. What is the reason for this?

Any help in resolving above queries is highly appreciated.

There should be a 'system.profile' collection for each database where operations for that database are entered.

  • Make sure you are checking the right database.
  • Check with the profile database command or the getProfilingLevel shell helper to make sure it is set the way you expect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM