cancel
Showing results for 
Search instead for 
Did you mean: 

Handling IGraphClient disconnections in ASPNET REST Api

jcagme
Node

Hi all,

We have an ASPNET REST Api hosted in AWS lambda and we are hosting our Neo4j cluster in Aura.

We connect to the cluster on Startup pretty much as done here MoviesMvcCore/Startup.cs at main · DotNet4Neo4j/MoviesMvcCore · GitHub.

After close to a month with this running with no major issue, the service got disconnected from the cluster making all REST Api request fail with "Client has not connected to the Neo4j server".

We immediately checked and the cluster was up and running and we were able to connect to it from other clients but we had to restart the service in order to have it connect to the cluster again.

My main question is, what's the recommended process to guarantee there is always a connection between the service and the cluster. One option we thought of was to catch and exception and it matched the one above, re-connect to the cluster but I don't think is very clean. Also, I don't really want to connect/disconnect on every request.

Any recommendations are highly appreciated.

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.