Is there any storage limit of system.profile

Is there any storage limit for system.profile?

I am following sequence to test queries.

  1. db.setProfilingLevel(2)
  2. code to testQueries…
  3. db.setProfilingLevel(0)
  4. export system.profile

But, exported database stores only last few queries. I don’t understand why? I want to record log of all executed queries. How can I resolve it?

Hi @Monika_Shah,
if i understand what have you asked, i think is needed to change this parameter:

slowms Default: 100

Type: integer

The slow operation time threshold, in milliseconds. Operations that run for longer than this threshold are considered slow.

Try to set it to a lower value and let me know if it works.

Best Regards

Actually, it is storing only profiling of last query only, which is bulk write and Bulk write will trigger many operations. Before this bulk write, there were many queries which has more than 100 ms execution time.

In fact, server config has specified slowms=10 as well as profile=2.

What could be reason and solution for this problem?