Hi,
enclosed you'll find a changeset with fix for wrong max_size in http
file cache:
max_size still in bytes in child workers, because cache init called in
master (and cache->max_size does not corrected from child if already
exists, and it is not in shared mem),
so this large size will be "never" reached, in such comparisons like `if
(size < cache->max_size) ...`.
Regards,
Sergey Brester (aka sebres).
# HG changeset patch
# User Serg G. Brester (sebres) <serg.bres...@sebres.de>
# Date 1465913777 -7200
# Tue Jun 14 16:16:17 2016 +0200
# Node ID b430e4546172af42bcecf0fc289ec45ef5f9e865
# Parent 1064ea81ed3aabb8ad422ffcc60ddcde667022ac
fix for http file cache: max_size still in bytes in child workers,
because cache init called in master, so this large size will be "never" reached
diff -r 1064ea81ed3a -r b430e4546172 src/http/ngx_http_file_cache.c
--- a/src/http/ngx_http_file_cache.c Thu Jun 09 16:55:38 2016 +0300
+++ b/src/http/ngx_http_file_cache.c Tue Jun 14 16:16:17 2016 +0200
@@ -130,6 +130,8 @@ ngx_http_file_cache_init(ngx_shm_zone_t
cache->sh = cache->shpool->data;
cache->bsize = ngx_fs_bsize(cache->path->name.data);
+ cache->max_size /= cache->bsize;
+
return NGX_OK;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel