I am reading over 100 million records from mongodb and creating nodes and relationships in neo4j. 
whenever I run this after executing certain records I am getting pymongo.errors.CursorNotFound: cursor id "..." not found
earlier when I was executing it without "no_cursor_timeout=True" in the mongodb query then at every 64179 records I was getting the same error but after looking for this on StackOverflow I had tried this adding no_cursor_timeout=True but now also at 2691734 value I am getting the same error.  HOW CAN I GET RID OF THIS ERROR I had also tried by defining the batch size.
Per the ticket Belly Buster mentioned you should try:

manually specifying the session to use with all your operations, and
periodically pinging the server using that session id to keep it alive on the server
getting pymongo.errors.CursorNotFound: cursor id "..." not found