Timeout issue/slow loading with retries
This pull request fixes an issue we have with wierd slowness of requests that manifested "sometimes".
Long time no see! Sorry for the delay on this, I clearly don't have my GH notifications set up properly..
Can you expand on what the concurrency problem was that warranted removing the retries? IIRC, that was covering up the issue of long-time idle connections. Maybe it's better to say it's expired though and let a connection pool or something handle that stuff.
I was hoping to have time to start using requests instead of the standard http lib to see if connection pooling would solve the weirdness I was experiencing. But...as always you need to get the things you are working on working ;) and this was how my colleague fixed the problem.
With this pull request you no longer keep a connection open for a longer period of time and even though it worked (worked as in not throwing exceptions) it sometimes took a very long time (10s+) getting the results.
It feels like there are something to gain by reusing connections but as the code works today it's not working as expected.
I am sure there is a better solution but I haven't had time to look in to it.
As always, good to hear from you! Hope you get around to Stockholm sooner or later!
Hmm, I see. I had a thought when I first built this that there'd be a connection pool sitting on top. I'm thinking that was probably wrong, and we should have a connection pool under the hood like you're noting. Incidentally, I'm writing a connection pool for a java driver right now: https://github.com/neo4j/java-driver/pull/8
We'll see what lessons come out of that - in the meantime, 10s overhead seems scary, but if the options are that or timeout exceptions, perhaps the odd pause is worth the overhead. I'm a bit hesitant, while the driver isn't in massive use, it still gets about 600 new downloads a month - we should probably measure the performance impact so that we don't cause a production hiccup for someone.
I'll see if I can do that, alt. see if I can try out requests with pooling.