0

I'm running into an issue when creating relationships to and from certain nodes hangs. And in some cases the hanging crashes the entire Neo4J instance.

When I'm looking at the stack trace of my application I'm seeing this behavior with the Java bolt driver.

sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1693)
java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1729)
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
org.neo4j.driver.internal.util.Futures.blockingGet(Futures.java:108)
org.neo4j.driver.internal.ExplicitTransaction.close(ExplicitTransaction.java:117)

This is when closing the transaction, though in some cases when I close the StatementResult I get the same hangups.

I tried reinstalling Neo4J from a dump and that didn't work, and I also tried removing and recreating all of my indexes and that didn't work.

lordmj
  • 47
  • 1
  • 9
  • Some more info would be helpful: What Neo4j version? What driver version? How many nodes and relationships in the graph? Can you express the equivalent transaction as a Cypher statement and successfully run it via the Neo4j Browser? – Pablissimo Sep 25 '19 at 06:40
  • Is your application the only application writing to Neo4j? Can you show your queries? Providing Neo4j server thread dump might also be useful. – František Hartman Sep 25 '19 at 09:15
  • What is the command to generate a thread dump? One thing the code is doing is that when the relationship is created it checks the related node (and it's "parents") for the existence of certain labels and applies those labels to the node the relationship is coming from. When I remove that section of the code the issue with the transaction hanging stops. – lordmj Sep 25 '19 at 16:48
  • You can use `neo4j-admin report`, the threaddump will be part of the report. Or any other way how to get Java threaddump. Can you add your queries, and code which runs them. It will likely be some locking issue/transaction left open etc.. – František Hartman Sep 26 '19 at 19:37
  • A temporary fix I made is to removed some logic from the create relationship operation I had because part of it was if you are creating a relationship of a certain type it would take a certain batch of labels from the end node and apply them to the start node and that operation hanged. So that logic has been removed for now and the transaction executes without it crashing the database. – lordmj Oct 13 '19 at 00:54

0 Answers0