Closed ekobi closed 2 years ago
Q: is it possible to directly configure the idle_timeout via Bolt-Sips?
Yes. Any config parameters you add to the driver and they are also supported by the underlining library DBConnection, will be used to initialize the pool. For example:
iex» {:ok, neo} = Sips.start_link(url: "bolt://neo4j:test@localhost", idle_interval: 2_000)
For brevity, when :idle_interval
is set and if no requests are received for the idle interval specified, the pool will ping all stale connections which can then ping the database to keep the connection alive.
Please try and let us know if it works. It's been a while since I've worked with this setting :)
HTH
Thanks for the hint, Florin.
kobi
On Sep 12, 2020, at 11:16, Florin notifications@github.com wrote:
Q: is it possible to directly configure the idle_timeout via Bolt-Sips?
Yes. Any config parameters you add to the driver and they are also supported by the underlining library DBConnection, will be used to initialize the pool. For example:
iex» {:ok, neo} = Sips.start_link(url: "bolt://neo4j:test@localhost", idle_interval: 2_000) For brevity, when :idle_interval is set and if no requests are received for the idle interval specified, the pool will ping all stale connections which can then ping the database to keep the connection alive.
Please try and let us know if it works. It's been a while since I've worked with this setting :)
HTH
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/florinpatrascu/bolt_sips/issues/95#issuecomment-691504797, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAP4O5LEWJUGG3WYWJMCC3SFOGGFANCNFSM4RFISWAQ.
Precheck
Environment
Elixir version (elixir -v):
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [hipe] [dtrace]
Elixir 1.10.4 (compiled with Erlang/OTP 23)
Neo4j and version (Neo4j 3.5.3, etc.):
Neo4j Community Edition 3.5.14
Connection scheme (
bolt://
,bolt+routing://
orneo4j://
):bolt://
Bolt.Sips version (mix deps):
Operating system: (Issue first observed on instance deployed on gigalixir; reproduced on macos system locally)
kobi@blackbird api $ uname -a Darwin blackbird.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
Current behavior
My app loses, then is unable to re-establish, its SSL connection to my graphene database server instance. I first saw the failure from a Google Cloud-based Elixir hosting service (gigalixir), and again while running a local Elixir deployment on my workstation at around 5pm EST today. Typical error log message appended below.
One strong possibility is that the connection is getting dropped by AWS after being idle for 10 minutes. I sniffed for TCP keepalives, and although it's hard to make a generalized statement, the db_connection driver seems to send them out after the first 600s or so, which would be right at the threshold. Q: is it possible to directly configure the
idle_timeout
via Bolt-Sips? Any other thoughts on what's happening? Cheers,Error log / Stack Trace
Expected behavior