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
+50-5Lines changed: 50 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -160,9 +160,11 @@ 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`
167
+
+ :ref:`connection-timeout-ref`
166
168
+ :ref:`encrypted-ref`
167
169
+ :ref:`keep-alive-ref`
168
170
+ :ref:`max-connection-lifetime-ref`
@@ -175,12 +177,52 @@ Additional configuration can be provided via the :class:`neo4j.Driver` construct
175
177
+ :ref:`user-agent-ref`
176
178
177
179
180
+
.. _session-connection-timeout-ref:
181
+
182
+
``session_connection_timeout``
183
+
------------------------------
184
+
The maximum amount of time in seconds the session will wait when trying to
185
+
establish a usable read/write connection to the remote host.
186
+
This encompasses *everything* that needs to happen for this, including,
187
+
if necessary, updating the routing table, fetching a connection from the pool,
188
+
and, if necessary fully establishing a new connection with the reader/writer.
189
+
190
+
Since this process may involve updating the routing table, acquiring a
191
+
connection from the pool, or establishing a new connection, it should be chosen
192
+
larger than :ref:`update-routing-table-timeout-ref`,
193
+
:ref:`connection-acquisition-timeout-ref`, and :ref:`connection-timeout-ref`.
194
+
195
+
:Type: ``float``
196
+
:Default: ``120.0``
197
+
198
+
199
+
.. _update-routing-table_timeout-ref:
200
+
201
+
``update_routing_table_timeout``
202
+
--------------------------------
203
+
The maximum amount of time in seconds the driver will attempt to fetch a new
204
+
routing table. This encompasses *everything* that needs to happen for this,
205
+
including fetching connections from the pool, performing handshakes, and
206
+
requesting and receiving a fresh routing table.
207
+
208
+
Since this process may involve acquiring a connection from the pool, or
209
+
establishing a new connection, it should be chosen larger than
210
+
:ref:`connection-acquisition-timeout-ref` and :ref:`connection-timeout-ref`.
211
+
212
+
:Type: ``float``
213
+
:Default: ``90.0``
214
+
215
+
178
216
.. _connection-acquisition-timeout-ref:
179
217
180
218
``connection_acquisition_timeout``
181
219
----------------------------------
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`.
220
+
The maximum amount of time in seconds the driver will wait to either acquire an
221
+
idle connection from the pool (including potential liveness checks) or create a
222
+
new connection when the pool is not full and all existing connection are in use.
223
+
224
+
Since this process may involve opening a new connection including handshakes,
225
+
it should be chosen larger than :ref:`connection-timeout-ref`.
184
226
185
227
:Type: ``float``
186
228
:Default: ``60.0``
@@ -190,7 +232,11 @@ Since the process of acquiring a connection may involve creating a new connectio
190
232
191
233
``connection_timeout``
192
234
----------------------
193
-
The maximum amount of time in seconds to wait for a TCP connection to be established.
235
+
The maximum amount of time in seconds to wait for a TCP connection to be
236
+
established.
237
+
238
+
This *does not* include any handshake(s), or authentication required before the
239
+
connection can be used to perform database related work.
194
240
195
241
:Type: ``float``
196
242
:Default: ``30.0``
@@ -224,7 +270,6 @@ Specify whether TCP keep-alive should be enabled.
224
270
225
271
``max_connection_lifetime``
226
272
---------------------------
227
-
228
273
The maximum duration in seconds that the driver will keep a connection for before being removed from the pool.
0 commit comments