Mercurial > hg > nginx-quic
annotate auto/summary @ 7281:bd6563e81cea
Limit req: improved handling of negative times.
Negative times can appear since workers only update time on an event
loop iteration start. If a worker was blocked for a long time during
an event loop iteration, it is possible that another worker already
updated the time stored in the node. As such, time since last update
of the node (ms) will be negative.
Previous code used ngx_abs(ms) in the calculations. That is, negative
times were effectively treated as positive ones. As a result, it was
not possible to maintain high request rates, where the same node can be
updated multiple times from during an event loop iteration.
In particular, this affected setups with many SSL handshakes, see
http://mailman.nginx.org/pipermail/nginx/2018-May/056291.html.
Fix is to only update the last update time stored in the node if the
new time is larger than previously stored one. If a future time is
stored in the node, we preserve this time as is.
To prevent breaking things on platforms without monotonic time available
if system time is updated backwards, a safety limit of 60 seconds is
used. If the time stored in the node is more than 60 seconds in the future,
we assume that the time was changed backwards and update lr->last
to the current time.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 30 May 2018 15:40:34 +0300 |
parents | 9eefb38f0005 |
children | 0b5f12d5c531 |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
4 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
6 echo |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 echo "Configuration summary" |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 |
337
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
285
diff
changeset
|
9 |
6018
466bd63b63d1
Thread pools implementation.
Valentin Bartenev <vbart@nginx.com>
parents:
6017
diff
changeset
|
10 if [ $USE_THREADS = YES ]; then |
466bd63b63d1
Thread pools implementation.
Valentin Bartenev <vbart@nginx.com>
parents:
6017
diff
changeset
|
11 echo " + using threads" |
466bd63b63d1
Thread pools implementation.
Valentin Bartenev <vbart@nginx.com>
parents:
6017
diff
changeset
|
12 fi |
466bd63b63d1
Thread pools implementation.
Valentin Bartenev <vbart@nginx.com>
parents:
6017
diff
changeset
|
13 |
265
6468241715e6
nginx-0.0.2-2004-02-20-19:48:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
14 if [ $USE_PCRE = DISABLED ]; then |
501 | 15 echo " + PCRE library is disabled" |
265
6468241715e6
nginx-0.0.2-2004-02-20-19:48:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
16 |
6468241715e6
nginx-0.0.2-2004-02-20-19:48:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
17 else |
6468241715e6
nginx-0.0.2-2004-02-20-19:48:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
18 case $PCRE in |
425
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
19 YES) echo " + using system PCRE library" ;; |
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
20 NONE) echo " + PCRE library is not used" ;; |
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
21 *) echo " + using PCRE library: $PCRE" ;; |
265
6468241715e6
nginx-0.0.2-2004-02-20-19:48:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
22 esac |
6468241715e6
nginx-0.0.2-2004-02-20-19:48:59 import
Igor Sysoev <igor@sysoev.ru>
parents:
255
diff
changeset
|
23 fi |
212
679f60139863
nginx-0.0.1-2003-12-19-11:15:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
24 |
399
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
337
diff
changeset
|
25 case $OPENSSL in |
425
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
26 YES) echo " + using system OpenSSL library" ;; |
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
27 NONE) echo " + OpenSSL library is not used" ;; |
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
28 *) echo " + using OpenSSL library: $OPENSSL" ;; |
399
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
337
diff
changeset
|
29 esac |
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
337
diff
changeset
|
30 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
31 case $ZLIB in |
425
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
32 YES) echo " + using system zlib library" ;; |
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
33 NONE) echo " + zlib library is not used" ;; |
bd39260a1383
nginx-0.0.10-2004-09-14-19:55:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
424
diff
changeset
|
34 *) echo " + using zlib library: $ZLIB" ;; |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
35 esac |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 |
3380
1d9063f7483c
print libatomic configure summary
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
37 case $NGX_LIBATOMIC in |
1d9063f7483c
print libatomic configure summary
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
38 YES) echo " + using system libatomic_ops library" ;; |
1d9063f7483c
print libatomic configure summary
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
39 NO) ;; # not used |
1d9063f7483c
print libatomic configure summary
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
40 *) echo " + using libatomic_ops library: $NGX_LIBATOMIC" ;; |
1d9063f7483c
print libatomic configure summary
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
41 esac |
1d9063f7483c
print libatomic configure summary
Igor Sysoev <igor@sysoev.ru>
parents:
2893
diff
changeset
|
42 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 echo |
255
e6938ca7331a
nginx-0.0.2-2004-02-09-23:47:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
44 |
e6938ca7331a
nginx-0.0.2-2004-02-09-23:47:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
45 |
479 | 46 cat << END |
493 | 47 nginx path prefix: "$NGX_PREFIX" |
48 nginx binary file: "$NGX_SBIN_PATH" | |
6383 | 49 nginx modules path: "$NGX_MODULES_PATH" |
1352 | 50 nginx configuration prefix: "$NGX_CONF_PREFIX" |
493 | 51 nginx configuration file: "$NGX_CONF_PATH" |
52 nginx pid file: "$NGX_PID_PATH" | |
479 | 53 END |
54 | |
469 | 55 if test -n "$NGX_ERROR_LOG_PATH"; then |
493 | 56 echo " nginx error log file: \"$NGX_ERROR_LOG_PATH\"" |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
57 else |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
58 echo " nginx logs errors to stderr" |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
59 fi |
479 | 60 |
61 cat << END | |
493 | 62 nginx http access log file: "$NGX_HTTP_LOG_PATH" |
63 nginx http client request body temporary files: "$NGX_HTTP_CLIENT_TEMP_PATH" | |
3557
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
64 END |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
65 |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
66 if [ $HTTP_PROXY = YES ]; then |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
67 echo " nginx http proxy temporary files: \"$NGX_HTTP_PROXY_TEMP_PATH\"" |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
68 fi |
479 | 69 |
3557
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
70 if [ $HTTP_FASTCGI = YES ]; then |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
71 echo " nginx http fastcgi temporary files: \"$NGX_HTTP_FASTCGI_TEMP_PATH\"" |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
72 fi |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
73 |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
74 if [ $HTTP_UWSGI = YES ]; then |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
75 echo " nginx http uwsgi temporary files: \"$NGX_HTTP_UWSGI_TEMP_PATH\"" |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
76 fi |
77188d729402
print default module temporary directory path in summary
Igor Sysoev <igor@sysoev.ru>
parents:
3549
diff
changeset
|
77 |
3637 | 78 if [ $HTTP_SCGI = YES ]; then |
79 echo " nginx http scgi temporary files: \"$NGX_HTTP_SCGI_TEMP_PATH\"" | |
80 fi | |
4280
91874133fb27
Renamed ngx_http_limit_zone_module to ngx_http_limit_conn_module.
Valentin Bartenev <vbart@nginx.com>
parents:
3895
diff
changeset
|
81 |
91874133fb27
Renamed ngx_http_limit_zone_module to ngx_http_limit_conn_module.
Valentin Bartenev <vbart@nginx.com>
parents:
3895
diff
changeset
|
82 echo "$NGX_POST_CONF_MSG" |