I have 2 collections: A (3.8M docs) and B (1.7M docs)
I have a PHP script that I run from a shell that:
- iterates over every entry in A
- ~ 60% of the time, it makes findOne on B (using _id)
- does some basic math by creating a php array
as soon as the cycle for all documents in is completed:
4) loop over php array
5) up in compilation C
during (1), I consistently get: PHP Fatal error: Failed to throw "MongoCursorException" with the message "No cursor found" The last processed item was # 8187 of 3872494.
real 1m25.478s user 0m0.076s sys 0m0.064s
By running it again, without changing the code, the exception fell into the element # 19826/3872495
real 3m19.144s user 0m0.120s sys 0m0.072s
And again, # 8181/387249
real 1m31.110s user 0m0.036s sys 0m0.048s
Yes, I understand that I can (and probably should) catch the exception ... but ... why is it even thrown? Especially with such a different past tense / depth in the database.
If that helps, my setup is a 3-node replica set (2 + arb). I took a secondary offline and tried only with the main launch. The same results (different number of processed results and times, but always throws a Cursor Not Found exception).
source share