-
Notifications
You must be signed in to change notification settings - Fork 155
Creating/closing a driver takes a long time #571
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
Comments
Do you know what the latency between the driver and the neo4j server instance is? The authentication requires round-trips to the server which will depend very much on that |
@eastlondoner Not sure about creation, but it seems that closing always takes ~ 2000 ms, and that shouldn't require round-trips should it? |
As of 1.7, a graceful shutdown sends a Note that TCP has a graceful shutdown sequence too, so there will definitely be network activity on connection closure. |
@technige That makes sense, thanks! But still seems like we're waiting for some ~2000ms timeout on close right? |
@tobias-johansson You can just call the async close |
@zhenlineo We actually did that in CAPS initially, but since CAPS creates many driver instances, (per test * label * partition) we would instead get errors due to depleted OS resources (can't recall exactly what - too many file handles or sockets) 😄 |
Hi, I have a simple program that connects to the database and ran a query "CALL db.labels()". After closing the driver, it just hangs there for a bit then prints the following warnings and error. Are they caused by this issue?
|
Hi @rickliao How did you used the driver? Did you close the session before you close the driver? |
Hi @zhenlineo, I opened the driver and session inside try-with-resources. Something like this:
I just tried closing session before driver using "finally" but got the same warning/error. In fact, I also got the same error when running the DriverTest class tobias-johansson posted. |
|
Hi @kant111 As they are behaviour changes, they will not be back ported to 1.7 drivers. |
Thanks @zhenlineo Should I use |
The text was updated successfully, but these errors were encountered: