@@ -93,7 +93,7 @@ const USER_AGENT = "neo4j-javascript/" + VERSION;
9393 * // TRUST_SYSTEM_CA_SIGNED_CERTIFICATES meand that you trust whatever certificates
9494 * // are in the default certificate chain of th
9595 * trust: "TRUST_ALL_CERTIFICATES" | "TRUST_ON_FIRST_USE" | "TRUST_SIGNED_CERTIFICATES" |
96- * "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES" | "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",
96+ * "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES" | "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",
9797 *
9898 * // List of one or more paths to trusted encryption certificates. This only
9999 * // works in the NodeJS bundle, and only matters if you use "TRUST_CUSTOM_CA_SIGNED_CERTIFICATES".
@@ -112,11 +112,20 @@ const USER_AGENT = "neo4j-javascript/" + VERSION;
112112 * // Connection will be destroyed if this threshold is exceeded.
113113 * connectionPoolSize: 50,
114114 *
115+ * // The maximum allowed lifetime for a pooled connection in milliseconds. Pooled connections older than this
116+ * // threshold will be closed and removed from the pool. Such discarding happens during connection acquisition
117+ * // so that new session is never backed by an old connection. Setting this option to a low value will cause
118+ * // a high connection churn and might result in a performance hit. It is recommended to set maximum lifetime
119+ * // to a slightly smaller value than the one configured in network equipment (load balancer, proxy, firewall,
120+ * // etc. can also limit maximum connection lifetime). No maximum lifetime limit is imposed by default. Zero
121+ * // and negative values result in lifetime not being checked.
122+ * maxConnectionLifetime: 30 * 60 * 1000, // 30 minutes
123+ *
115124 * // Specify the maximum time in milliseconds transactions are allowed to retry via
116125 * // {@link Session#readTransaction()} and {@link Session#writeTransaction()} functions. These functions
117126 * // will retry the given unit of work on `ServiceUnavailable`, `SessionExpired` and transient errors with
118127 * // exponential backoff using initial delay of 1 second. Default value is 30000 which is 30 seconds.
119- * maxTransactionRetryTime: 30000,
128+ * maxTransactionRetryTime: 30000, // 30 seconds
120129 *
121130 * // Provide an alternative load balancing strategy for the routing driver to use.
122131 * // Driver uses "least_connected" by default.
0 commit comments