Creating/closing a driver takes a long time
See original GitHub issue- Neo4j version: Community Neo4j 3.5.3
- Neo4j Mode: Single instance
- Driver version: Java language driver 1.7.2
- Operating system: Ubuntu 18.04.2 LTS
- Steps to reproduce
- Start local instance of Neo4j 3.5.3
- Run the following class
import org.neo4j.driver.v1.*;
public class DriverTest {
public static void main(String[] args) {
long start = System.currentTimeMillis();
Driver driver = GraphDatabase.driver("bolt://localhost:7687", AuthTokens.basic("neo4j", "hej"));
long created = System.currentTimeMillis();
driver.close();
long closed = System.currentTimeMillis();
System.out.println("creation: " + (created - start) + "ms");
System.out.println("closing: " + (closed - created) + "ms");
}
}
- Expected behavior
creation: 14ms
closing: 22ms
- Actual behavior
creation: 1478ms
closing: 2248ms
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Microsoft Word takes a long time to close
Boot your computer in Clean boot mode and then start the application. If it works successfully, then some program is conflicting with this....
Read more >OpenAccess JDBC driver takes long time to close the ...
Closing a connection with OpenAccess JDBC client takes more than 30 seconds as it does not send the TCP FIN to close the...
Read more >[SOLVED] Computer Running Very Slow and Freezing
Fix 1: Close some programs. If you have too many programs running at once, your computer will definitely slow down.
Read more >Is Windows Taking Forever to Shut Down? Try This!
Halt the shutdown process by clicking Cancel and then make sure you've saved your data in all programs open. Remember to save before...
Read more >CMV Driving Tips - Following Too Closely | FMCSA
The CMV driver does not slow down appropriately and comes close to the rear of the passenger vehicle as it changes lanes. TRAINING...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @kant111 The close blocking for too long problem has been fix in 2.0 with this PR https://github.com/neo4j/neo4j-java-driver/pull/576. For the driver creation takes too long problem, it will be fixed in this PR https://github.com/neo4j/neo4j-java-driver/pull/609, where you can choose to turn off the connectivity verification on driver creation to avoid a network round trip.
As they are behaviour changes, they will not be back ported to 1.7 drivers.
Closing issue as this has been addressed in #576 and #609.