summaryrefslogtreecommitdiffhomepage
path: root/src/os/win32/ngx_process_cycle.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-01-29Silenced complaints about socket leaks on forced termination.Maxim Dounin1-1/+1
When graceful shutdown was requested, and then nginx was forced to do fast shutdown, it used to (incorrectly) complain about open sockets left in connections which weren't yet closed when fast shutdown was requested. Fix is to avoid complaining about open sockets when fast shutdown was requested after graceful one. Abnormal termination, if requested with the WINCH signal, can still happen though.
2022-11-18Process events posted by ngx_close_idle_connections() immediately.Roman Arutyunyan1-0/+1
Previously, if an event was posted by a read event handler, called by ngx_close_idle_connections(), that event was not processed until the next event loop iteration, which could happen after a timeout.
2017-11-28Fixed "changing binary" when reaper is not init.Ruslan Ermilov1-0/+1
On some systems, it's possible that reaper of orphaned processes is set to something other than "init" process. On such systems, the changing binary procedure did not work. The fix is to check if PPID has changed, instead of assuming it's always 1 for orphaned processes.
2017-03-07Introduced worker_shutdown_timeout.Maxim Dounin1-0/+1
The directive configures a timeout to be used when gracefully shutting down worker processes. When the timer expires, nginx will try to close all the connections currently open to facilitate shutdown.
2017-03-07Cancelable timers are now preserved if there are other timers.Maxim Dounin1-5/+1
There is no need to cancel timers early if there are other timers blocking shutdown anyway. Preserving such timers allows nginx to continue some periodic work till the shutdown is actually possible. With the new approach, timers with ev->cancelable are simply ignored when checking if there are any timers left during shutdown.
2016-10-05Cache: cache manager limits.Dmitry Volyntsev1-3/+3
The new parameters "manager_files", "manager_sleep" and "manager_threshold" were added to proxy_cache_path and friends. Note that ngx_path_manager_pt was changed to return ngx_msec_t instead of time_t (API change).
2016-08-04Always seed PRNG with PID, seconds, and milliseconds.Ruslan Ermilov1-1/+3
2016-08-04Win32: added per-thread random seeding.Ruslan Ermilov1-0/+2
The change in b91bcba29351 was not enough to fix random() seeding. On Windows, the srand() seeds the PRNG only in the current thread, and worse, is not inherited from the calling thread. Due to this, worker threads were not properly seeded. Reported by Marc Bevand.
2016-04-08Removed redundant "u" format specifier.Ruslan Ermilov1-1/+1
It is implied for "x" and "X".
2016-03-31Fixed ngx_os_signal_process() prototype.Ruslan Ermilov1-2/+2
2016-03-31Fixed ngx_pid_t formatting in ngx_sprintf() and logging.Sergey Kandaurov1-4/+4
2016-02-04Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin1-9/+9
2015-08-11Core: idle connections now closed only once on exiting.Valentin Bartenev1-18/+4
Iterating through all connections takes a lot of CPU time, especially with large number of worker connections configured. As a result nginx processes used to consume CPU time during graceful shutdown. To mitigate this we now only do a full scan for idle connections when shutdown signal is received. Transitions of connections to idle ones are now expected to be avoided if the ngx_exiting flag is set. The upstream keepalive module was modified to follow this.
2015-05-20Introduced worker number, ngx_worker.Maxim Dounin1-0/+1
2015-03-26Removed "worker_threads" and "thread_stack_size" directives.Ruslan Ermilov1-21/+0
2015-03-26Removed unused thread-local-storage code.Ruslan Ermilov1-9/+0
2015-03-26Removed ngx_threaded and related code.Ruslan Ermilov1-1/+0
2014-08-13Events: introduced cancelable timers.Valentin Bartenev1-0/+2
2014-03-31Win32: fixed cpu hog by cache manager on exit (ticket #514).Maxim Dounin1-3/+3
The "ngx_quit" may be reset by the worker thread before it's seen by a ngx_cache_manager_thread(), resulting in an infinite loop. Make sure to test ngx_exiting as well.
2014-03-06Added connection serial number in logging of left open sockets.Sergey Kandaurov1-2/+2
2013-11-29Win32: fixed init_process without master process (ticket #453).Maxim Dounin1-10/+0
Init process callbacks are called by ngx_worker_thread(), there is no need to call them in ngx_single_process_cycle().
2013-09-04Win32: MinGW GCC compatibility.Maxim Dounin1-2/+2
Several warnings silenced, notably (ngx_socket_t) -1 is now checked on socket operations instead of -1, as ngx_socket_t is unsigned on win32 and gcc complains on comparison. With this patch, it's now possible to compile nginx using mingw gcc, with options we normally compile on win32.
2012-09-28Correct plural form for "path" in the whole source base.Andrey Belov1-4/+4
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-09-19Replaced "can not" with "cannot" and "could not" in a bunch of places.Ruslan Ermilov1-1/+1
Fixed nearby grammar errors.
2010-09-02add "Global\" prefix for signal eventsIgor Sysoev1-9/+11
2010-03-25*) introduce ngx_time_sigsafe_update() to update the error log time onlyIgor Sysoev1-7/+7
*) change ngx_time_update() interface
2010-03-13*) use previously cached GMT offset value to update time from a signal handlerIgor Sysoev1-7/+7
*) change ngx_time_update() interface since there are no notification methods those return time
2009-11-17a cache manager thread handle was overwritten by a cache loader thread handle,Igor Sysoev1-2/+2
this caused an exit delay, the bug had been introduced in r3023
2009-08-21*) share temporary number between workersIgor Sysoev1-4/+0
*) randomize collision offset
2009-08-11win32 cache loader supportIgor Sysoev1-0/+33
2009-08-11style fixIgor Sysoev1-1/+1
2009-08-10introduce NGX_PROCESS_JUST_SPAWN and change field name accordinglyIgor Sysoev1-4/+4
2009-06-07update r2925Igor Sysoev1-0/+2
2009-06-06*) exit if no workers could not be startedIgor Sysoev1-6/+11
*) do not quit old workers if no new workers could not be started
2009-06-05fix debug loggingIgor Sysoev1-2/+2
2009-06-02log GetExitCodeProcess()'s errnoIgor Sysoev1-1/+1
2009-05-08reconfigure master processIgor Sysoev1-0/+8
2009-04-21implement "-s signal" option for UnixIgor Sysoev1-51/+7
2009-04-20Win32 master/workers modelIgor Sysoev1-163/+970
2009-03-30ngx_process_tray()Igor Sysoev1-38/+44
2005-11-15nginx-0.3.10-RELEASE importrelease-0.3.10Igor Sysoev1-2/+2
*) Change: the "valid_referers" directive and the "$invalid_referer" variable were moved to the new ngx_http_referer_module from the ngx_http_rewrite_module. *) Change: the "$apache_bytes_sent" variable name was changed to "$body_bytes_sent". *) Feature: the "$sent_http_..." variables. *) Feature: the "if" directive supports the "=" and "!=" operations. *) Feature: the "proxy_pass" directive supports the HTTPS protocol. *) Feature: the "proxy_set_body" directive. *) Feature: the "post_action" directive. *) Feature: the ngx_http_empty_gif_module. *) Feature: the "worker_cpu_affinity" directive for Linux. *) Bugfix: the "rewrite" directive did not unescape URI part in redirect, now it is unescaped except the %00-%25 and %7F-%FF characters. *) Bugfix: nginx could not be built by the icc 9.0 compiler. *) Bugfix: if the SSI was enabled for zero size static file, then the chunked response was encoded incorrectly.
2005-10-19nginx-0.3.3-RELEASE importrelease-0.3.3Igor Sysoev1-4/+4
*) Change: the "bl" and "af" parameters of the "listen" directive was renamed to the "backlog" and "accept_filter". *) Feature: the "rcvbuf" and "sndbuf" parameters of the "listen" directive. *) Change: the "$msec" log parameter does not require now the additional the gettimeofday() system call. *) Feature: the -t switch now tests the "listen" directives. *) Bugfix: if the invalid address was specified in the "listen" directive, then after the -HUP signal nginx left an open socket in the CLOSED state. *) Bugfix: the mime type may be incorrectly set to default value for index file with variable in the name; the bug had appeared in 0.3.0. *) Feature: the "timer_resolution" directive. *) Feature: the millisecond "$upstream_response_time" log parameter. *) Bugfix: a temporary file with client request body now is removed just after the response header was transferred to a client. *) Bugfix: OpenSSL 0.9.6 compatibility. *) Bugfix: the SSL certificate and key file paths could not be relative. *) Bugfix: the "ssl_prefer_server_ciphers" directive did not work in the ngx_imap_ssl_module. *) Bugfix: the "ssl_protocols" directive allowed to specify the single protocol only.
2005-05-12nginx-0.1.29-RELEASE importrelease-0.1.29Igor Sysoev1-9/+12
*) Feature: the ngx_http_ssi_module supports "include virtual" command. *) Feature: the ngx_http_ssi_module supports the condition command like 'if expr="$NAME"' and "else" and "endif" commands. Only one nested level is supported. *) Feature: the ngx_http_ssi_module supports the DATE_LOCAL and DATE_GMT variables and "config timefmt" command. *) Feature: the "ssi_ignore_recycled_buffers" directive. *) Bugfix: the "echo" command did not show the default value for the empty QUERY_STRING variable. *) Change: the ngx_http_proxy_module was rewritten. *) Feature: the "proxy_redirect", "proxy_pass_request_headers", "proxy_pass_request_body", and "proxy_method" directives. *) Feature: the "proxy_set_header" directive. The "proxy_x_var" was canceled and must be replaced with the proxy_set_header directive. *) Change: the "proxy_preserve_host" is canceled and must be replaced with the "proxy_set_header Host $host" and the "proxy_redirect off" directives, the "proxy_set_header Host $host:$proxy_port" directive and the appropriate proxy_redirect directives. *) Change: the "proxy_set_x_real_ip" is canceled and must be replaced with the "proxy_set_header X-Real-IP $remote_addr" directive. *) Change: the "proxy_add_x_forwarded_for" is canceled and must be replaced with the "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for" directive. *) Change: the "proxy_set_x_url" is canceled and must be replaced with the "proxy_set_header X-URL http://$host:$server_port$request_uri" directive. *) Feature: the "fastcgi_param" directive. *) Change: the "fastcgi_root", "fastcgi_set_var" and "fastcgi_params" directive are canceled and must be replaced with the fastcgi_param directives. *) Feature: the "index" directive can use the variables. *) Feature: the "index" directive can be used at http and server levels. *) Change: the last index only in the "index" directive can be absolute. *) Feature: the "rewrite" directive can use the variables. *) Feature: the "internal" directive. *) Feature: the CONTENT_LENGTH, CONTENT_TYPE, REMOTE_PORT, SERVER_ADDR, SERVER_PORT, SERVER_PROTOCOL, DOCUMENT_ROOT, SERVER_NAME, REQUEST_METHOD, REQUEST_URI, and REMOTE_USER variables. *) Change: nginx now passes the invalid lines in a client request headers or a backend response header. *) Bugfix: if the backend did not transfer response for a long time and the "send_timeout" was less than "proxy_read_timeout", then nginx returned the 408 response. *) Bugfix: the segmentation fault was occurred if the backend sent an invalid line in response header; the bug had appeared in 0.1.26. *) Bugfix: the segmentation fault may occurred in FastCGI fault tolerance configuration. *) Bugfix: the "expires" directive did not remove the previous "Expires" and "Cache-Control" headers. *) Bugfix: nginx did not take into account trailing dot in "Host" header line. *) Bugfix: the ngx_http_auth_module did not work under Linux. *) Bugfix: the rewrite directive worked incorrectly, if the arguments were in a request. *) Bugfix: nginx could not be built on MacOS X.
2005-03-19nginx-0.1.25-RELEASE importrelease-0.1.25Igor Sysoev1-1/+1
*) Bugfix: nginx did run on Linux parisc. *) Feature: nginx now does not start under FreeBSD if the sysctl kern.ipc.somaxconn value is too big. *) Bugfix: if a request was internally redirected by the ngx_http_index_module module to the ngx_http_proxy_module or ngx_http_fastcgi_module modules, then the index file was not closed after request completion. *) Feature: the "proxy_pass" can be used in location with regular expression. *) Feature: the ngx_http_rewrite_filter_module module supports the condition like "if ($HTTP_USER_AGENT ~ MSIE)". *) Bugfix: nginx started too slow if the large number of addresses and text values were used in the "geo" directive. *) Change: a variable name must be declared as "$name" in the "geo" directive. The previous variant without "$" is still supported, but will be removed soon. *) Feature: the "%{VARIABLE}v" logging parameter. *) Feature: the "set $name value" directive. *) Bugfix: gcc 4.0 compatibility. *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
2004-11-11nginx-0.1.5-RELEASE importrelease-0.1.5Igor Sysoev1-1/+206
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
2004-10-11nginx-0.1.1-RELEASE importrelease-0.1.1Igor Sysoev1-2/+2
*) Feature: the gzip_types directive. *) Feature: the tcp_nodelay directive. *) Feature: the send_lowat directive is working not only on OSes that support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT. *) Feature: the setproctitle() emulation for Linux and Solaris. *) Bugfix: the "Location" header rewrite bug fixed while the proxying. *) Bugfix: the ngx_http_chunked_module module may get caught in an endless loop. *) Bugfix: the /dev/poll module bugs fixed. *) Bugfix: the responses were corrupted when the temporary files were used while the proxying. *) Bugfix: the unescaped requests were passed to the backend. *) Bugfix: while the build configuration on Linux 2.4 the --with-poll_module parameter was required.
2004-09-29nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyrightIgor Sysoev1-1/+1
2004-09-28nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused filesIgor Sysoev1-0/+5
2004-06-24nginx-0.0.7-2004-06-24-20:07:04 importIgor Sysoev1-0/+2