I turned profiler for couple of days, however, I can only see most recent occurrences for about 10 seconds, despite I opts to show 200 records, for result of last 24 hrs.
Also after couple of seconds, when I click one occurrence, there is no query code displayed.
Thanks for reaching out! Based on your description, here are a few possible reasons why you’re only seeing recent query occurrences:
Profiler Time Window – The profiler only shows query-type operations. If you’re looking for other slow operations, check currentOp.
Threshold Settings – The profiler captures queries slower than 100ms by default. If your MongoDB profiler is set to 1000ms, queries between 100–999ms won’t be recorded.
Capped Collection Limitation – system.profile has a fixed size. If too many slow queries are logged, older records get removed.
To investigate further, could you check:
Your MongoDB profiler settings (slowms value).
How many slow queries are logged per second in system.profile.