Do you actually run into GC issues, or is it just the Neo4j cache that's filled?
Would it be possible to run this (with 512M or 1G heap) and create a heap-dump and look at the occupation? Thx Michael > Am 12.03.2015 um 17:41 schrieb Adrian Gruntkowski > <[email protected]>: > > Hello, > > Hi. I'm having problems deleting nodes and relationships from a server-side > plugin. > > I have a following code that is supposed to accomplish this: > > public class Purger { > private static final int BATCH_SIZE = 1000; > ... > public static void purgeDictionary(GraphDatabaseService graphDb, int > dictionary) { > Transaction tx = graphDb.beginTx(); > int count = 0; > try { > for (String label : new String[]{"station", "arrival", > "departure", "change", "dictionary", "estimate-station"}) { > ResourceIterable<Node> nodes = > graphDb.findNodesByLabelAndProperty(DynamicLabel.label(label), > "dictionary-id", dictionary); > for (Node node : nodes) { > for (Relationship rel : node.getRelationships()) { > rel.delete(); > } > node.delete(); > if (++count % BATCH_SIZE == 0) { > tx.success(); > tx.close(); > tx = graphDb.beginTx(); > } > } > } > tx.success(); > } finally { > tx.close(); > } > } > ... > } > > > > The problem is, the operation quickly fills up the heap, no matter if it's > 2GB or 8GB. The graph has about 1.7M nodes. What am I doing wrong here? > > I'm currently running neo4j 2.1.7 under JDK8 under 64bit Linux Debian > derivative. > > Regards, > Adrian > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Neo4j" 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.
