graphaware / neo4j-bolt-php

PHP Driver for Neo4j's Binary Protocol : Bolt
MIT License
42 stars 38 forks source link

Process gets into infinite loop if neo4j goes away #27

Open cebe opened 6 years ago

cebe commented 6 years ago

When neo4j becomes unavailable while running a query, the connecting process does not terminate with an exception but stays in an infinite loop, utilizing 100% CPU:

bildschirmfoto von 2017-12-23 01-05-52

Simple steps to reproduce:

  1. Write a script that runs neo4j queries in a loop, add some output after each query is finished.
  2. While it is running, stop neo4j. The script will stop outputting anything and stay at 100% CPU waiting for something.

Starting neo4j again does not change anything, the script will still be in this state. Got this reproduced on production server and also on my local dev machine.

cebe commented 6 years ago

@ikwattro any idea on how to fix this? This has quite some impact on production systems when running background jobs that have no time constraints.