You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/api.rst
+52-5Lines changed: 52 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,8 @@ Driver Configuration
160
160
161
161
Additional configuration can be provided via the :class:`neo4j.Driver` constructor.
162
162
163
-
163
+
+ :ref:`session-connection-timeout-ref`
164
+
+ :ref:`update-routing-table-timeout-ref`
164
165
+ :ref:`connection-acquisition-timeout-ref`
165
166
+ :ref:`connection-timeout-ref`
166
167
+ :ref:`encrypted-ref`
@@ -175,12 +176,55 @@ Additional configuration can be provided via the :class:`neo4j.Driver` construct
175
176
+ :ref:`user-agent-ref`
176
177
177
178
179
+
.. _session-connection-timeout-ref:
180
+
181
+
``session_connection_timeout``
182
+
------------------------------
183
+
The maximum amount of time in seconds the session will wait when trying to
184
+
establish a usable read/write connection to the remote host.
185
+
This encompasses *everything* that needs to happen for this, including,
186
+
if necessary, updating the routing table, fetching a connection from the pool,
187
+
and, if necessary fully establishing a new connection with the reader/writer.
188
+
189
+
Since this process may involve updating the routing table, acquiring a
190
+
connection from the pool, or establishing a new connection, it should be chosen
191
+
larger than :ref:`update-routing-table-timeout-ref`,
192
+
:ref:`connection-acquisition-timeout-ref`, and :ref:`connection-timeout-ref`.
193
+
194
+
:Type: ``float``
195
+
:Default: ``120.0``
196
+
197
+
198
+
.. _update-routing-table_timeout-ref:
199
+
200
+
``update_routing_table_timeout``
201
+
--------------------------------
202
+
The maximum amount of time in seconds the driver will attempt to fetch a new
203
+
routing table. This encompasses *everything* that needs to happen for this,
204
+
including fetching connections from the pool, performing handshakes, and
205
+
requesting and receiving a fresh routing table.
206
+
207
+
Since this process may involve acquiring a connection from the pool, or
208
+
establishing a new connection, it should be chosen larger than
209
+
:ref:`connection-acquisition-timeout-ref` and :ref:`connection-timeout-ref`.
210
+
211
+
This setting only has an effect for :ref:`neo4j-driver-ref`, but not for
212
+
:ref:`bolt-driver-ref` as it does no routing at all.
213
+
214
+
:Type: ``float``
215
+
:Default: ``90.0``
216
+
217
+
178
218
.. _connection-acquisition-timeout-ref:
179
219
180
220
``connection_acquisition_timeout``
181
221
----------------------------------
182
-
The maximum amount of time in seconds a session will wait when requesting a connection from the connection pool.
183
-
Since the process of acquiring a connection may involve creating a new connection, ensure that the value of this configuration is higher than the configured :ref:`connection-timeout-ref`.
222
+
The maximum amount of time in seconds the driver will wait to either acquire an
223
+
idle connection from the pool (including potential liveness checks) or create a
224
+
new connection when the pool is not full and all existing connection are in use.
225
+
226
+
Since this process may involve opening a new connection including handshakes,
227
+
it should be chosen larger than :ref:`connection-timeout-ref`.
184
228
185
229
:Type: ``float``
186
230
:Default: ``60.0``
@@ -190,7 +234,11 @@ Since the process of acquiring a connection may involve creating a new connectio
190
234
191
235
``connection_timeout``
192
236
----------------------
193
-
The maximum amount of time in seconds to wait for a TCP connection to be established.
237
+
The maximum amount of time in seconds to wait for a TCP connection to be
238
+
established.
239
+
240
+
This *does not* include any handshake(s), or authentication required before the
241
+
connection can be used to perform database related work.
194
242
195
243
:Type: ``float``
196
244
:Default: ``30.0``
@@ -224,7 +272,6 @@ Specify whether TCP keep-alive should be enabled.
224
272
225
273
``max_connection_lifetime``
226
274
---------------------------
227
-
228
275
The maximum duration in seconds that the driver will keep a connection for before being removed from the pool.
0 commit comments