Welcome! Log In Create A New Profile

Advanced

Re: cache file has too long header (bug) ?

Maxim Dounin
September 10, 2015 02:20PM
Hello!

On Thu, Sep 10, 2015 at 01:30:46PM -0400, biazus wrote:

> Hey Guys,
>
> I've been using nginx 1.8.0 for a couple of months, and I noticed a critical
> message at error log informing that "cache file has too long header".
>
> 2015/09/10 17:11:03 [crit] 27245#0: *10686 cache file
> "/data/smallfiles/http/6/d8/f5df8d6eda60819319688d1bc0cb2d86" has too long
> header
>
> However, as you can see at the example bellow, there is nothing abnormal
> with the file:
>
> cat /data/smallfiles/http/6/d8/f5df8d6eda60819319688d1bc0cb2d86

[...]

The message is logged when nginx detects the problem, ignores the
cached file and starts loading another response from an upstream
server. So, unfortunately, as long as the message appeared, it's
probably too late to look into the file as it's likely already
reloaded from a backend.

The message itself is expected to appear if a response header
stored in the cache file is too big for configured
proxy_buffer_size. It may also appear due to a small race
condition in nginx cache logic if two different responses are
loaded into cache simultaneously, see here:

http://hg.nginx.org/nginx/rev/6f97afc238de
http://mailman.nginx.org/pipermail/nginx-devel/2011-September/001287.html

The message may also indicates that the cache file was corrupted
somehow.

If you see the message on a regular basis, we may want to
investigate further. If it's just a single case in couple of
months, it is probably due to the race condition in question and
likely can be ignored safely.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

cache file has too long header (bug) ?

biazus September 10, 2015 01:30PM

Re: cache file has too long header (bug) ?

Maxim Dounin September 10, 2015 02:20PM

Re: cache file has too long header (bug) ?

biazus September 10, 2015 04:52PM

Re: cache file has too long header (bug) ?

Maxim Dounin September 11, 2015 10:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 293
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready