neo4j-javascript-driver: ECONNRESET - Session Expired

Hi! I am making a web application based on NodeJS and AngularJS. These applications are deployed on Azure and I also have a virtual machine with Neo4J on it. My requests through the driver are OK, excepted after a certain amount of time, I get this error :

econ

Here is how I instantiate the driver :

var neo4j = require('neo4j-driver').v1; var driver = neo4j.driver("bolt://server.adress", neo4j.auth.basic("login", "password")); module.exports = driver;

Here is how I request my server. For each request that is send, I create a new session that I closed right after.

var driver = require('driver_neo4j'); this.method = function() { var session = driver.session(); session.run("REQUEST") .then(function(result) { session.close(); }); }

I found nothing weird in the Neo4J server logs. It’s look like it’s related to this #144 If you have any ideas to solve this problem, I’m taking them!

Update : I actually upgrade neo4j-driver version 1.2 to 1.3. From now on I get the exact same stack of error with the following code : ‘ServiceUnavailable’ @Lahpman7 This error is happening every 5 to 10 minutes in my application.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

@jremyf @Lahpman7 it does sound like some keep alive or ping functionality could be useful here. I guess it is also possible to do a simpler thing and just close connections that were idle for more than configurable amount of time. This approach also omits TCP retransmission possible during ping.

We will investigate how to add such feature in upcoming releases.

In my case the issue was on the database side I could increase memory settings. I guess cloud setups (including official community edition on aws marketplace)are not optimised to take full advantage of the host machine unless you manually configure them to achieve it and that somehow defeats the purpose of installing it from marketplace.