Closed
Description
From time to time, I see this message in the logs of my app.
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:286:12)
at NodeChannel.write (.../node_modules/neo4j-driver/lib/v1/internal/ch-node.js:254:20)
at Chunker.flush (.../node_modules/neo4j-driver/lib/v1/internal/chunking.js:114:18)
at Connection.sync (.../node_modules/neo4j-driver/lib/v1/internal/connector.js:488:21)
at Session._onClose (.../node_modules/neo4j-driver/lib/v1/driver.js:163:14)
at Session.close (.../node_modules/neo4j-driver/lib/v1/session.js:138:16)
at .../node_modules/seraph/lib/bolt/seraph.js:191:46
at _treatParams.then.then.catch (.../node_modules/seraph/lib/bolt/seraph.js:260:31)
at process._tickDomainCallback (internal/process/next_tick.js:129:7)
I am able to reproduce it by following these steps:
- Start neo4j and my app
- Make a request to my app, there is now one connection in the pool
- Restart the neo4j database
- Make another request to my app
To me, it seems like the connection pool is holding on to these connections that were closed by the server, i.e. the server sent a FIN packet to the socket. I have some code that fixes the issue for me, will submit a PR momentarily.
Metadata
Metadata
Assignees
Labels
No labels