Maxim Dounin
c42c70f478
Workaround for cpu hog on errors with cached connections.
...
Just doing another connect isn't safe as peer.get() may expect peer.tries
to be strictly positive (this is the case e.g. with round robin with multiple
upstream servers). Increment peer.tries to at least avoid cpu hog in
round robin balancer (with the patch alert will be seen instead).
This is not enough to fully address the problem though, hence TODO. We
should be able to inform balancer that the error wasn't considered fatal
and it may make sense to retry the same peer.
2011-09-15 18:12:58 +00:00
Maxim Dounin
d7c2673d3f
API change: ngx_chain_update_chains() now requires pool.
...
The ngx_chain_update_chains() needs pool to free chain links used for buffers
with non-matching tags. Providing one helps to reduce memory consumption
for long-lived requests.
2011-09-15 16:03:17 +00:00
Igor Sysoev
c2f852c260
update r3945 with more descriptive error message
2011-07-29 15:33:03 +00:00
Igor Sysoev
a3741fb24d
finalizing with rc == 0 in unbuffered proxy mode caused nginx to wait
...
for another send_timeout before actually closing client's connection
if client timed out while still talking to upstream server
patch by Maxim Dounin
2011-07-22 13:30:16 +00:00
Igor Sysoev
6c3c3bbe42
fix segfault if cache key is larger than upstream buffer size
...
patch by Lanshun Zhou
2011-07-19 11:24:16 +00:00
Igor Sysoev
87ee007022
revert r3935 and fix "stalled cache updating" alert
...
by freeing cache at upstream finalize phase
patch by Maxim Dounin
2011-06-28 13:26:08 +00:00
Igor Sysoev
1788ec0c48
fix "stalled cache updating" alert,
...
when non-cachable HEAD response did not not free an expired cache node
2011-06-01 08:02:34 +00:00
Igor Sysoev
0d6283918f
fix a broken cached response if bypass/no_cache directive values are different,
...
the bug has been introduced in r3700
2011-05-13 10:05:38 +00:00
Igor Sysoev
64efecc2b5
allow to use $upstream_... variables in SSI
2011-04-21 10:07:07 +00:00
Igor Sysoev
fde7d51392
fix case when a host in fastcgi_pass, scgi_pass, and uwsgi_pass
...
is given by expression and refers to a defined upstream
2011-04-04 10:43:21 +00:00
Igor Sysoev
9135a0e022
move debug logging inside ngx_http_file_cache_free()
2010-07-28 15:56:56 +00:00
Igor Sysoev
406a68003c
several changes in cache cleanup handling:
...
*) now ngx_http_file_cache_cleanup() uses ngx_http_file_cache_free()
*) ngx_http_file_cache_free() interface has been changed to accept r->cache
ngx_http_file_cache_cleanup() must use r->cache, but not r, because
there can be several r->cache's during request processing, r->cache may
be NULL at request finalising, etc.
*) test if updating request does not complete correctly
2010-07-28 15:49:34 +00:00
Igor Sysoev
6af21b7cda
fix r3707: cache node should be freed be a response is not cached
2010-07-27 15:26:33 +00:00
Igor Sysoev
3cf3100977
fix typo
2010-07-27 13:04:13 +00:00
Igor Sysoev
f297d0dd27
an intercepted error code was not cached
2010-07-19 15:31:46 +00:00
Igor Sysoev
cc963cd7e2
style fix
2010-07-19 15:29:16 +00:00
Igor Sysoev
f7d659aa52
proxy_cache_pass, fastcgi_cache_bypass, uwsgi_cache_bypass, scgi_cache_bypass
2010-07-19 09:36:04 +00:00
Igor Sysoev
6a47b43234
rename ngx_http_file_cache_create() to ngx_http_file_cache_new()
2010-07-16 10:01:49 +00:00
Igor Sysoev
9aa3d7f667
ngx_http_file_cache_create()
2010-07-15 14:01:02 +00:00
Igor Sysoev
f3870c66df
use ngx_http_test_predicates(), ngx_http_set_predicate_slot()
...
delete ngx_http_cache(), ngx_http_no_cache_set_slot()
2010-07-14 11:15:45 +00:00
Igor Sysoev
0bd1809f05
treat Set-Cookie as a header that forbids caching
2010-07-02 09:49:27 +00:00
Igor Sysoev
7e14b50c28
use shared ngx_http_upstream_ignore_headers_masks[]
2010-07-02 09:25:38 +00:00
Igor Sysoev
de0b1d6f12
remove r->zero_in_uri
2010-05-24 12:35:10 +00:00
Igor Sysoev
9b2763a245
proxy_no_cache and fastcgi_no_cache
2010-05-24 11:01:05 +00:00
Igor Sysoev
402b2f07c2
do not cache response if it has "no-store" or "private"
...
in "Cache-Control" header
2010-05-14 12:04:58 +00:00
Igor Sysoev
05b1a8f1e3
ngx_str_set() and ngx_str_null()
2010-05-14 09:56:37 +00:00
Igor Sysoev
328df7a5cc
use ngx_min() and ngx_max()
2010-05-14 09:55:33 +00:00
Igor Sysoev
5739072cfe
fix segfault: ngx_http_upstream_cleanup() cleans r->cleanup,
...
the bug had been introduced in r3419
2010-05-14 09:22:58 +00:00
Igor Sysoev
4e20f24b5b
delete u->cleanup mark, this fixes large values in $upstream_response_time,
...
the bug had been introduced in r3007
2010-01-29 16:45:14 +00:00
Igor Sysoev
e146ebd813
allow to handle 301/302 in error_page
2009-12-23 15:31:16 +00:00
Igor Sysoev
bd375b9566
fix typo
2009-12-23 14:22:17 +00:00
Igor Sysoev
601ab90cd4
fix handling cached HTTP/0.9 response
2009-11-29 20:48:01 +00:00
Igor Sysoev
8b816d88a9
change ngx_parse_addr() interface
2009-11-02 16:11:06 +00:00
Igor Sysoev
72e928755b
proxy_bind, fastcgi_bind, and memcached_bind
2009-11-02 15:24:02 +00:00
Igor Sysoev
671236993a
test comma separator in "Cache-Control"
2009-10-08 14:22:00 +00:00
Igor Sysoev
136dd8d1e6
use real file cache length, this fixes cache size counting for responses
...
without "Content-Length" header and 304 responses.
2009-10-07 12:55:58 +00:00
Igor Sysoev
65166cfa2f
fix request counter in resolver handling, the bug was introduced in r3050
2009-09-28 12:31:47 +00:00
Igor Sysoev
a552ab476e
check unsafe Destination
2009-09-25 09:30:06 +00:00
Igor Sysoev
12a7d493d4
fix request counter for X-Accel-Redirect, the bug was introduced in r3050
2009-09-13 13:45:32 +00:00
Igor Sysoev
3e751480b2
increase request counter before an upstream cleanup because the cleanup
...
decreases the counter via ngx_http_finalize_request(r, NGX_DONE),
the bug was introduced in r3050
2009-09-08 11:37:50 +00:00
Igor Sysoev
8013a83067
clean cache updating state if a response has uncacheable code or
...
cache prohibitive headers
2009-09-04 09:57:38 +00:00
Igor Sysoev
8b8e995eb8
do not create cache key in AIO invocation
2009-08-28 11:23:50 +00:00
Igor Sysoev
a39d4e1aee
fix sending a cached file using AIO
2009-08-28 11:22:27 +00:00
Igor Sysoev
6fb506a215
directio_alignment
2009-08-28 08:15:55 +00:00
Igor Sysoev
a962506498
FreeBSD and Linux AIO support
2009-08-28 08:12:35 +00:00
Igor Sysoev
5297d456d8
axe r->connection->destroyed testing
2009-08-26 16:14:57 +00:00
Igor Sysoev
5374610ace
process upstream ETag header
2009-08-23 16:10:39 +00:00
Igor Sysoev
9db33c9234
fix copy destination name length, introduced in r3025
2009-08-20 13:37:26 +00:00
Igor Sysoev
b7a09c5523
allow cross device temporary files atomic copying:
...
*) ngx_copy_file()
*) delete ngx_ext_rename_file_t.log_rename_error and .rename_error fields
2009-08-12 12:05:33 +00:00
Igor Sysoev
22fc3e656e
fix segfault introduced in r3007
2009-08-07 13:16:42 +00:00