How to specify a no-timeout option on the cursor?
I can run the job manually and from my laptop but something is going on the server and all the time I am getting this error:
MONGODB cursor.refresh() for cursor xxx Query response returned CURSOR_NOT_FOUND. Either an invalid cursor was specified, or the cursor may have timed out on the server. MONGODB cursor.refresh() for cursor yyy
The job is ran from a ruby scheduler file that and is specified as a namespace in rake rake is calling for another ruby module in the middle, and the job dies during the execution of this module
I asked this question earlier and it got downvoted. Please, instead of downvoting explain what is so stupid about it, because I really need to solve this problem and can't figure out what is going on.
The server is kind of experimental and does not have any monitoring tools. But it seems to be reliable. And there are no other jobs running.
See the FAQ for the Ruby MongoDB driver for details on how to turn off the cursor timeout.
Example from there:
@collection.find({}, :timeout => false) do |cursor|
cursor.each do |document
# Process documents here
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With