question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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
  1. Start local instance of Neo4j 3.5.3
  2. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
zhenlineocommented, Jul 1, 2019

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.

0reactions
technigecommented, Jan 2, 2020

Closing issue as this has been addressed in #576 and #609.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found