Skip to content

Commit 5f52bdb

Browse files
p-mongop
andauthored
RUBY-2488 use Ruby 3 toolchain
(#2159) * use ubuntu1604 for ruby 2.3 testing * JRuby 9.2.14.0 added TCP_KEEPINTVL etc. but they are not working * document jruby keepalive limitation Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 32eb29d commit 5f52bdb

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

source/tutorials/ruby-driver-create-client.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,16 +1253,27 @@ The driver does not currently implement the Happy Eyeballs algorithm.
12531253
TCP Keepalive Configuration
12541254
===========================
12551255

1256-
The driver sets TCP keepalive by default. The following default values are also set if the system
1257-
value can be determined and if the driver default value is less than the system value.
1256+
Where allowed by system configuration and the Ruby language runtime,
1257+
the driver enables TCP keepalive and, for each of the keepalive parameters
1258+
listed below, sets the value of the respective parameter to the specified
1259+
value if the system value can be determined and is higher than the
1260+
listed driver value:
12581261

12591262
- ``tcp_keepalive_time``: 120 seconds
12601263
- ``tcp_keepalive_intvl``: 10 seconds
12611264
- ``tcp_keepalive_cnt``: 9 probes
12621265

1266+
.. note::
1267+
1268+
As of JRuby 9.2.14.0, JRuby does not implement the APIs required to
1269+
set the keepalive parameters. When using JRuby, the driver will not be
1270+
able to set the keepalive parameters and the system configuration will
1271+
be in effect.
12631272

1264-
Please see the `MongoDB Diagnostics FAQ keepalive section <https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#serverselectiontimeoutms>`_
1265-
for instructions on setting these values at the system level.
1273+
To use lower values, or to change the parameters in environments like JRuby
1274+
that do not expose the required APIs, please adjust the parameters at the
1275+
system level as described in the `MongoDB Diagnostics FAQ keepalive section
1276+
<https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#serverselectiontimeoutms>`_.
12661277

12671278

12681279
Connection Pooling

0 commit comments

Comments
 (0)