-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Closed
Labels
Description
Environment
Include the result of the following commands:
nginx -V
: master branchuname -a
: Darwin 23.6.0 arm64, macOS 14.6.1
Description
Currently, nginx detects TCP_KEEPIDLE
when running configure
on all Unix-like platforms. However, macOS uses TCP_KEEPALIVE
in place of TCP_KEEPIDLE
, which leads nginx on macOS to fail the detection and overlook the TCP keepalive mechanism that is fully supported on macOS.
Furthermore, for TCP keepalive mechanism, SO_KEEPALIVE
is inherited by a accepted socket from the listening socket on most UNIX-like OS's, whereas TCP_KEEP*
options are only inherited on Linux, FreeBSD, or DragonFlyBSD, which means platforms other than linux, freebsd and dragonflybsd don't not enable TCP keepalive currently.
- The bug is reproducible with the latest version of nginx
- The nginx configuration is minimized to the smallest possible
to reproduce the issue and doesn't contain third-party modules
nginx configuration
-
nginx debug log
auto/configure
...
checking for IPV6_MTU_DISCOVER ... not found
checking for IP_DONTFRAG ... found
checking for IPV6_DONTFRAG ... found
checking for TCP_DEFER_ACCEPT ... not found
*checking for TCP_KEEPIDLE ... not found*