Thanks Mark for your reply. Your suggestion resolved the cursor issue. However, the whole process still too slow. Do you have any suggestion to speedup the performance?
Regards, Nader -- On Wednesday, December 7, 2016 at 12:10:15 PM UTC+1, mpv1989 wrote: > > Hi, > > When you iterate over the cursor, the cursor ask the server every 1000 > documents (default batch size) for the next 1000 documents. The cursor will > be removed on the server automatically after a specific amount of time > (time-to-live). When this time expired between your iteration steps you get > the error "cursor not found" because it is already deleted. To prevent this > you can set the `ttl` (time-to-live in seconds, see http-docu here > <https://docs.arangodb.com/3.1/HTTP/AqlQueryCursor/AccessingCursors.html#create-cursor>) > in > `AqlQueryOptions` to a higher value. > > Because of the slow process, it would be helpful if you can share your > code. > > Best > Mark > > Am Mittwoch, 7. Dezember 2016 10:54:49 UTC+1 schrieb [email protected]: >> >> 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. >> > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
