You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every day or so the connection so my neo4j server crashes. This is probably due to the pool size and connection limits. The app and connection works like a charm for a day and then it just stops.
I have tried increasing memory limits and pool size limits and tweaked timeouts, but nothing works. Almost like clockwork the connection crashes.
I don't know what to do and would really like some help.
[Error: Connection acquisition timed out in 60000 ms. Pool status: Active conn count = 0, Idle conn count = 0.]
[Error]: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1733988069189, routers=[], readers=[], writers=[]]
at d (/app/.next/server/chunks/192.js:5:779)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async o (/app/.next/server/chunks/192.js:1:9163)
at async o (/app/.next/server/app/(public)/login/page.js:1:13638) {
errorCode: 'QUERY_FAILED',
digest: '3375610673'
}
neo4j-driver: 5.27.0
nextjs: 14.2.15 - running in standalone mode in a docker container.
neo4j: 5.19 - running in docker container
The text was updated successfully, but these errors were encountered:
With what I'm seeing here this looks like a networking issue not related to the driver. There's no apparent misuse of the driver in your provided gist, and the errors you're being shown are the ones I'd expect to see if all your connections were killed and blocked from outside the driver.
I am not an expert in nextjs, but my best guess is that some network policy in it is getting triggered and blocking the drivers traffic, which means it can no longer acquire connections.
If there's details in that make you feel certain that this is a driver error, or if you find out more about this issue, please reach out!
Hi, thank you for the response. I also don't hink there's an issue with the actual driver. But maybe there's something that could be done to support serverless applications (reaching here)?
Could you expand on the network policy thing? I'm not sure how to troubleshoot that.
Hi again, @fredrikburmester ! I caught up on your thread on the community forums, and have been chatting with Gerrit and Adam. I fully agree with them that you should run driver.close() at the end of your executeQuery function, it was my mistake to not notice the creation of a driver without closing it.
In case this doesn't work, or just to check the communication of your application to the server, you could look into the CYPHER function CALL dbms.listConnections() which will let you see if you have a large number of open connections, or if the connections are not making it across at all.
Bug Report
Every day or so the connection so my neo4j server crashes. This is probably due to the pool size and connection limits. The app and connection works like a charm for a day and then it just stops.
I have tried increasing memory limits and pool size limits and tweaked timeouts, but nothing works. Almost like clockwork the connection crashes.
I don't know what to do and would really like some help.
Here's a gist of my driver initialization: https://gist.github.com/fredrikburmester/a39aa948843d962e5bd0b783774b7f77
Errors I'm seeing in the logs:
neo4j-driver: 5.27.0
nextjs: 14.2.15 - running in standalone mode in a docker container.
neo4j: 5.19 - running in docker container
The text was updated successfully, but these errors were encountered: