| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Cache fixes:
*) Obsolete code removed.
The ngx_http_cache() and ngx_http_no_cache_set_slot() functions
were replaced in 0.8.46 and no longer used since then.
*) Handling of cache files with long headers.
There are two possible situations which can lead to this: response
was cached with bigger proxy_buffer_size value (and nginx was
restared since then, i.e. shared memory zone content was lost), or
due to the race in the cache update code (see [1]) we've end up
with fcn->body_start from a different response stored in shared
memory zone.
*) Only complain on long locked entries.
There have been multiple reports of cases where a real locked entry
was removed, resulting in a segmentation fault later in a worker
which locked the entry. It looks like default inactive timeout isn't
enough in real life.
For now just ignore such locked entries, and move them to the top of
the inactive queue to allow processing of other entries.
[1] http://mailman.nginx.org/pipermail/nginx-devel/2011-September/001287.html
|
|
HTTP cache related fixes:
*) Cache: fix for sending of empty responses.
Revert wrong fix for empty responses introduced in 0.8.31 and apply new
one, rewritten to match things done by static module as close as possible.
*) Cache: fix for sending of stale responses.
For normal cached responses ngx_http_cache_send() sends last buffer and then
request finalized via ngx_http_finalize_request() call, i.e. everything is
ok.
But for stale responses (i.e. when upstream died, but we have something in
cache) the same ngx_http_cache_send() sends last buffer, but then in
ngx_http_upstream_finalize_request() another last buffer is send. This
causes duplicate final chunk to appear if chunked encoding is used (and
resulting problems with keepalive connections and so on).
Fix this by not sending in ngx_http_upstream_finalize_request()
another last buffer if we know response was from cache.
*) Fixed cache bypass caching of non-cacheable replies (ticket #21).
If cache was bypassed with proxy_cache_bypass, cache-controlling headers
(Cache-Control, Expires) wasn't considered and response was cached even
if it was actually non-cacheable.
Patch by John Ferlito.
|
|
Cache fixes:
*) do not close connection if cache file is too small: replace it with
valid one
*) rename ngx_http_file_cache_manager_sleep() to
ngx_http_file_cache_loader_sleep() and do not use it all in cache manager:
this is a vestige of the times when cache manager loaded cache
*) set correct configuration file values while adding path
|
|
Cache loader improvements:
The cache loader performs two tasks: inserting cache objects in inactivity
list and evaluating total cache size. Reading just directory is enough for
this purpose. Elimination of reading cache files saves at least one disk I/O
operation per file.
|
|
Cache size accounting fix: actual cache size on disk was less than
needed by sum of sizes of files loaded by worker processes themselves
while cache loader was running.
The bug has been introduced in r3900.
|
|
patch by Maxim Dounin
|
|
the bug has been introduced in r3700
|
|
instead of file length rounded to a file system block size.
There is no similar way on Windows, so rounding to a cache->bsize is kept.
|
|
patch by Maxim Dounin
|
|
to delete old inactive entries: one of them removes a entry just locked by
other manager from the queue and the rbtree as long inactive entry,
causes the latter manager to segfault leaving cache mutex locked,
the bug has been introduced in r3727
|
|
|
|
the bug has been introduced in r3712
|
|
|
|
|
|
|
|
*) move fileless cache key node removal in ngx_http_file_cache_delete()
|
|
|
|
the bug has been introduced in r3695, r3708, r3711
|
|
|
|
*) 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
|
|
|
|
*) freed valid keys zone node
*) and did not decrease cache size, so cache manager process ete CPU time,
if cache checking max_size was enabled
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*) change ngx_time_update() interface
|
|
*) change ngx_time_update() interface since there are no notification methods
those return time
|
|
|
|
|
|
|
|
if aio does not present
|
|
without "Content-Length" header and 304 responses.
|
|
|
|
this fixes "zero size buf in output" alert
|
|
|
|
*) ngx_copy_file()
*) delete ngx_ext_rename_file_t.log_rename_error and .rename_error fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|