I'm using ArangoDB 3.1.2. I've a collection with almost 70000 documents (each document is a simple Java class with 8 string properties). Lets call this collection Coll-1. I query all documents in Coll-1, and start iterating through them. For each document, I query an 'edge' collection, and then create another document which I insert in Coll-2. The insert is batch (10 documents) insert.
I've run the above process 10 times, and only once it completed without error. I get the following error during reading.
--
Caused by: com.arangodb.ArangoDBException: Response: 404, Error: 1600 - cursor not found
at com.arangodb.internal.velocystream.Communication.checkError(Communication.java:104) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:122) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.internal.velocystream.CommunicationSync.execute(CommunicationSync.java:42) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:58) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.internal.ArangoExecutorSync.execute(ArangoExecutorSync.java:47) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.ArangoDatabase$1.next(ArangoDatabase.java:245) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.internal.ArangoCursorIterator.next(ArangoCursorIterator.java:61) ~[arangodb-java-driver-4.1.0.jar:na]
at com.arangodb.ArangoCursor.next(ArangoCursor.java:110) ~[arangodb-java-driver-4.1.0.jar:na]
--
Besides the above error, the process is very slow. The only time which completed without error, it took 30min to to complete. I've done the same in relational database (except I didn't query any 'edge' collection), and it took 3min to complete.
I appreciate any help on the above issues.