I am running a process that updates some entries in my mongo db using Pymongo. I have another process who does polling on these entries (using 'find' evrey minutes) to see if the other process is done. 
I noticed that after about 30-40 minutes I get an empty cursor even though these entries are still in the database. 
At first I thought it happens due to changing these entries but then I run a process that just use the same query once every minute and I saw the same phenomena: After 30-40 minutes I get no results.
I noticed that if I wait 2-3 minutes I get the results I am requesting.
I tried to use the explain function but couldn't find anything helpful there.
Did you ever see something similar? If so what can I do?
Is there a way to tell that the cursor is empty? Is the rate limit configurable?
thank you in advance!
Apparently it was due to high CPU in mongo. 
The database was synced with another one once every hour and during that time the queries returned empty results. 
When we scheduled the sync to happen only once a day we stopped seeing this problem (we also added a retry mechanism to avoid error on the sync time. However, this retry will be helpful only when you know for sure that the query should not return an empty cursor).
MongoDB query returns no results after a while