Opened 3 years ago
Closed 3 years ago
#2443 closed defect (invalid)
why ngx_clone_listening?
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | nginx-core | Version: | 1.23.x | 
| Keywords: | Cc: | ||
| uname -a: | Linux x1g7 5.15.88-gentoo-b1 #1 SMP Thu Jan 19 20:37:01 CST 2023 x86_64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz GenuineIntel GNU/Linux | ||
| nginx -V: | 
          nginx version: nginx/1.23.2
           built with OpenSSL 1.1.1s 1 Nov 2022 TLS SNI support enabled configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log --pid-path=/run/nginx.pid --lock-path=/run/lock/nginx.lock --with-cc-opt=-I/usr/include --with-ld-opt=-L/usr/lib64 --http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=/var/lib/nginx/tmp/client --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-compat --with-http_v2_module --with-pcre --without-pcre2 --with-http_realip_module --with-http_ssl_module --without-stream_access_module --without-stream_geo_module --without-stream_limit_conn_module --without-stream_map_module --without-stream_return_module --without-stream_split_clients_module --without-stream_upstream_hash_module --without-stream_upstream_least_conn_module --without-stream_upstream_zone_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module --user=nginx --group=nginx  | 
      ||
Description
when reuseport and worker are enabled, nginx will clone the listening entry,then nginx will call socket&&bind&&listen for worker_processes times,with same port,and we got worker_processes listening fd which works all the same. is this necessary? i tried removing the call of ngx_clone_listening it seems works fine.
Attachments (1)
Change History (3)
by , 3 years ago
| Attachment: | nginx_mini.conf added | 
|---|
comment:1 by , 3 years ago
Sorry, I didn't understand enough about reuseport and missed some details in the source code. Now I understand what happened.
comment:2 by , 3 years ago
| Resolution: | → invalid | 
|---|---|
| Status: | new → closed | 
For questions about nginx, please consider using support options available. Thank you.
  Note:
 See   TracTickets
 for help on using tickets.
    
simple config