adam-cowley / neode

Neo4j OGM for Node.js
MIT License
394 stars 72 forks source link

Session Expired on Query #180

Open alex-laycalvert opened 1 year ago

alex-laycalvert commented 1 year ago

I'm running some queries using the cypher queries and just passing text and parameters and on some instances, the queries error out with a code of Session Expired and a message saying Neo4j Error: No longer possible to write to server at <server>. The actual text length varies and it seems like they are erroring out before even attempting to run.

About my setup, I have a separate singleton class I'm using as a wrapper around Neode which when instantiated for the first time just sets the neode instance to new Neode(...). I don't know if this is screwing up some of the session creation or any pooling that happens.

Is this common on larger queries or is there a connection setting that is going wrong somewhere?

Thanks.

alex-laycalvert commented 1 year ago

Looks like every time cypher readCypher or writeCypher is called, a new session is made so I don't think there's some global session that's expiring, but maybe I am messing it up with how I have my project configured.

alex-laycalvert commented 1 year ago

Looks like this is related to this article. I seem to only be having this issue in production.