Hi, > I've been trying that query out (slightly modified now to return all nodes > of a different kind, but attached to a node in the first set), on a data set > of around 100K, and I'm getting an OutOfMemoryError: > { > "message" : "GC overhead limit exceeded", > "exception" : "java.lang.OutOfMemoryError: GC overhead limit exceeded", > "stacktrace" : [ ] > } > > My request (for gremlin over REST) is: > "script": "m = [:]; g.v(id).in('R_PartOf').loop(1){m.put(it.object, > it.loops); true} >> -1; m.sort{a,b -> a.value <=> > b.value}.keySet()._().in('R_OtherEdge')", > "params": > { > "id": 284 > }
You have the following data structures consuming memory: 1. m 2. m sorted 3. the keyset of m Perhaps those are sufficiently large to blow our your memory. Perhaps test by, for example, not getting keySet or not sorting. When I do large Map-based computations in Gremlin, I use JDBM2 as my map data structure as its persistent and when it overflows memory, its written to disk. http://code.google.com/p/jdbm2/ HTH, Marko. http://markorodriguez.com _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user