That query is simply a long running read, without any criteria (so it is running against all data). As it fetches back the data, it will be done in batchesbatches (based on your batch size) and then issue a getmore
on the same cursorcursor for the next set of results.
The numYields
numYields
count does not mean itthe query is being blocked, it means that it yielded its lock when needed. This is usually done for a write, and usually when itthe original query had to page fault to disk to get data, then it resumes (when querying all data in a collection, this is going to happen often unless all your data + indexes fit in RAM). The
Therefore, the query is not being blocked, in fact the getmore
operations show that it is progressing over time - most long running reads will have a similar profile, especially if you are writing to the database at the same time.
It is also not likely to bethat this query is the cause of any crash (it's just a read), it's more likely something else that is causing the crash, and you are equating this query with the crash because it happens to be running at the time when the crash occurs (people often suspect the serverStatusserverStatus
command for the same reason - it is run once a minute by MMSMMS). I would recommend posting the full messaging around the crash as a separate question for proper diagnosis.
For what it's worth, with snapshot
snapshot
set to true, and the fact that it is reading all data, I suspect this is a mongodump
query (it defaults to using snapshot to avoid duplicates being dumped when data is moved).