Liveness checks will be completed when borrowing a pooled connection, given that the connection has been idle longer than the timeout.
The driver, by default, will not add liveness checks, but this can be configured with WithConnectionLivenessCheckTimeout on the ConfigBuilder.
using var driver = GraphDatabase.Driver(uri, creds,
cb => cb.WithConnectionLivenessCheckTimeout(TimeSpan.FromSeconds(30));
Using a timeout of 0, all connections will complete a liveness check when taken from the pool; this ensures connections are healthy but comes at the cost of performance when running queries or starting transactions.
This change introduces a liveness check timeout.
WithConnectionLivenessCheckTimeout
on theConfigBuilder
.Using a timeout of
0
, all connections will complete a liveness check when taken from the pool; this ensures connections are healthy but comes at the cost of performance when running queries or starting transactions.