[PATCH] Mail: nginx_error:cache file has too long header

Yongguang Bai yongguang.bai at quantil.com
Tue Nov 27 02:11:33 UTC 2018


# HG changeset patch
# User Yongguang Bai <yongguang.bai at quantil.com>
# Date 1543276278 28800
#      Mon Nov 26 15:51:18 2018 -0800
# Node ID 4d48e1f3ebf6f0634e8e2cbd057d9fcfbea9d988
# Parent  a7ff19afbb14795fef14f599a304d0ad21052b70
Mail: nginx_error:cache file has too long header

This error is printed when cached file is expired and the
response is changed in proxied server, and Nginx is under
heavy load.

diff -r a7ff19afbb14 -r 4d48e1f3ebf6 src/http/ngx_http_file_cache.c
--- a/src/http/ngx_http_file_cache.c	Mon Nov 26 18:29:56 2018 +0300
+++ b/src/http/ngx_http_file_cache.c	Mon Nov 26 15:51:18 2018 -0800
@@ -376,6 +376,10 @@
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "http file cache fd: %d", of.fd);
 
+    if(c->uniq != of.uniq){
+        c->body_start = ngx_pagesize;
+    }
+
     c->file.fd = of.fd;
     c->file.log = r->connection->log;
     c->uniq = of.uniq;


More information about the nginx-devel mailing list