If you migrated your javascript application from an older version (3.4 and older) and have been relying on using the http.Agent keepAlive (from https://nodejs.org/api/http.html#http_new_agent_options ) to do some socket life-cycle management, you are likely to face connection issues in Aura.
The nature of causal cluster and socket reuse in a cloud service like Aura means that your connection needs to renew at some point. Using a keep-alive approach will lead to problems, as this goes against the built-in behaviour of the official driver.
You may face this type of error:
{ Neo4jError: Connection acquisition timed out in 60000 ms. Pools status: Active conn count = 100, Idle conn count = 0.
2021-01-26T15:01:46.825733494Z
2021-01-26T15:01:46.825736175Z at captureStacktrace (/usr/src/app/node_modules/neo4j-driver/lib/result.js:281:15)
2021-01-26T15:01:46.825738762Z at new Result (/usr/src/app/node_modules/neo4j-driver/lib/result.js:68:19)
2021-01-26T15:01:46.825741401Z at Session._run (/usr/src/app/node_modules/neo4j-driver/lib/session.js:174:14)
2021-01-26T15:01:46.825743869Z at Session.run (/usr/src/app/node_modules/neo4j-driver/lib/session.js:135:19)
2021-01-26T15:01:46.825746373Z at _treatParams.then.params (/usr/src/app/node_modules/seraph/lib/bolt/seraph.js:279:28)
2021-01-26T15:01:46.825748967Z at <anonymous>
2021-01-26T15:01:46.825751367Z at process._tickDomainCallback (internal/process/next_tick.js:229:7) code: 'N/A', name: 'Neo4jError' },
Instead of this, let the official javascript driver handle connections and sockets.
Comments
0 comments
Please sign in to leave a comment.