Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database driver configuration options #36

Open
ejschoen opened this issue Oct 6, 2023 · 0 comments
Open

Database driver configuration options #36

ejschoen opened this issue Oct 6, 2023 · 0 comments

Comments

@ejschoen
Copy link

ejschoen commented Oct 6, 2023

There is a problem accessing Neo4j Aura databases--the connection times out and closes if unused after 60 minutes. It's necessary to trap the org.neo4j.driver.exceptions.SessionExpiredException and close and reopen the connection to solve this. We don't automatically close the driver after each query because doing so seems to incure a significant memory leak (about 500k bytes each time).

Neo4j says to configure the driver for a 50 minute max lifetime: here. This is done by calling with the Config builder's withMaxConnectionLifetime method, but that isn't exposed in the neo4j-clj.core/config function.

There are a large number of Config builder functions--is it worth supporting more of them in config or would it be better to delegate that responsibility to the calling program and expose a connect variant that accepts a built Config object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant