neo4jrb / neo4j-core

A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
MIT License
99 stars 80 forks source link

Bolt adaptor cannot recover from neo4j restart #321

Open beho opened 6 years ago

beho commented 6 years ago

Hi,

I'm using neo4j-core to acess external neo4j from very simple Sinatra-base API.

When Bolt adaptor is used and database is restarted without restart the API, next query causes ruby process to use a lot of CPU time and thus rendering API useless. I had to switch to HTTP adaptor which gracefully continues to operate when database boots up.

Runtime information:

Neo4j database version: neo4j gem version: 3.3.4 neo4j-core gem version: 8.1.4

jorroll commented 6 years ago

I believe the bolt adapter is defined here, if you're interested in figuring out what's going wrong: https://github.com/neo4jrb/neo4j-core/blob/master/lib/neo4j/core/cypher_session/adaptors/bolt.rb

I don't believe anyone, in particular, has claimed "responsibility" for maintaining the bolt adapter, so unless you are interested in fixing this issue, I think your best bet is to stick with the http adapter.