MongoDB Shard - Disable Cursor timeout
There is a 10 minute time out for inactive cursors, and it can be overridden, but be careful: "immortal" cursors can become a problem if enough of them accumulate on the server over time.  So, it would be a good idea to close your cursor correctly from time to time and avoid that if possible.  You should also make sure that it is in fact the cursor timeout that is hurting you here (and not a TCP timeout for example).

The option to turn off the timeout involves basically setting the noTimeout flag.  In Java that means using addOption on the cursor and setting QUERYOPTION_NOTIMEOUT.