Opened 8 years ago

Closed 8 years ago

#1008 closed defect (worksforme)

Nginx ignores reload

Reported by: Anton T Owned by:
Priority: minor Milestone:
Component: other Version: 1.9.x
Keywords: Cc:
uname -a: Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.9.10
built with OpenSSL 1.0.1k 8 Jan 2015
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads --add-module=/build/nginx-1.9.10/debian/modules/nginx-auth-pam --add-module=/build/nginx-1.9.10/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-1.9.10/debian/modules/nginx-echo --add-module=/build/nginx-1.9.10/debian/modules/nginx-upstream-fair --add-module=/build/nginx-1.9.10/debian/modules/ngx_http_substitutions_filter_module

Description

Good day. We've bumped with the problem, when nginx don't update configuration during reload.

We're using simple configuration files, with several large lists of server_name parameters.
server_name parameter sections is loaded via include. It's content generated via script.

nginx -s reload executed via cron job every 5 minutes.

Today we had a problem when nginx didn't reloaded 'server_name' sections of config file. We didn't observer any errors or warnings in error.log or in nginx -t output.

Attachments (1)

nginx.conf (979 bytes ) - added by Anton T 8 years ago.
main config

Download all attachments as: .zip

Change History (2)

by Anton T, 8 years ago

Attachment: nginx.conf added

main config

comment:1 by Maxim Dounin, 8 years ago

Resolution: worksforme
Status: newclosed

Normal nginx behaviour is to reject a configuration if there are any errors during parsing of the configuration, or during applying it. There are lots of errors possible - including configuration syntax errors (e.g., you've tried to reload nginx while another process was updating configuration files) and various resource exhaustion (e.g., no memory). In case of errors nginx will write something to logs. Note though, that 3rd party modules may not log errors properly, and it's generally good idea to see if you are able to reproduce the problem without 3rd party modules compiled in.

Relevant information should be in /var/log/nginx/error_log.nginx as per configuration file attached, and /var/log/nginx/error.log before a configuration was parsed. Though may be in another file if running nginx instance have a different configuration.

Note well that there may be no information logged at all if there is a problem external to nginx - e.g., "nginx -s" was not able to start.

Unless you have some additional information to support the idea there is a bug in nginx, please use mailing list, as this doesn't looks relevant to Trac.

Note: See TracTickets for help on using tickets.