Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP keepalive on Darwin is overlooked by detecting the wrong socket option #336

Open
2 tasks done
panjf2000 opened this issue Nov 19, 2024 · 0 comments · May be fixed by #337
Open
2 tasks done

TCP keepalive on Darwin is overlooked by detecting the wrong socket option #336

panjf2000 opened this issue Nov 19, 2024 · 0 comments · May be fixed by #337
Labels

Comments

@panjf2000
Copy link
Contributor

Environment

Include the result of the following commands:

  • nginx -V: master branch
  • uname -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.

  • 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*
@panjf2000 panjf2000 added the bug label Nov 19, 2024
@panjf2000 panjf2000 linked a pull request Nov 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant