- 
    Type:Improvement 
- 
    Resolution: Fixed
- 
    Priority:Major - P3 
- 
    Affects Version/s: None
- 
    Component/s: None
- 
    None
- 
        Fully Compatible
- 
        v6.0, v5.0, v4.4
- 
        Service Arch 2022-12-26, Service Arch 2022-09-05, Service Arch 2022-09-19, Service Arch 2022-10-03, Service Arch 2022-10-17, Service Arch 2022-10-31, Service Arch 2022-11-14, Service Arch 2022-11-28, Service Arch 2022-12-12, Service Arch 2023-01-09, Service Arch 2023-01-23, Service Arch 2023-02-06, Service Arch 2023-02-20, Service Arch 2023-03-06, Service Arch 2023-03-20, Service Arch 2023-04-03
- 
        (copied to CRM)
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
It seems that SERVER-57466 broke the TCP Keepalive parameter settings on Linux.
I'm looking at this optval variable.
https://github.com/10gen/mongo/pull/695/files#diff-19e9e1bf9007ae5e281e4d8f2c2b4704547ad7917c3557867bf91fdc45e18601L155
Previously it was set to 1 and then overwritten by getsockopt.
The value retrieved by getsockopt is compared against a maxval to determine if clipping is necessary, and if so, a setsockopt overwrites the value attached to the socket.
But in SERVER-57466, the rawOptVal read by getsockopt is discarded.
The optVal variable is never rewritten at all, and the clipping never occurs because 1 second is never greater than the maxVal variable, which is a constant that's either 300 or 1 second depending on the call site.
So the setsockopt to configure TCP_KEEPIDLE and TCP_KEEPINTVL never happen.
- duplicates
- 
                    SERVER-57468 Enable TCP_USER_TIMEOUT by default -         
- Backlog
 
-         
- is caused by
- 
                    SERVER-57466 Swallow connection reset-related errors received during ASIO session establishment -         
- Closed
 
-         
- related to
- 
                    SERVER-107969 The socketOption was not updated as expected in version 6.x -         
- Closed
 
-