On Wed, Dec 07, 2016 at 02:02:32AM -0500, omkar_jadhav_20 wrote:
> Hi ,
> We are getting too many Cache file has too long header errors in nginx
> error.log file. Some servers are getting such error as many as 273 times a
On Wed, Dec 07, 2016 at 05:24:23AM -0500, omkar_jadhav_20 wrote:
> Please note that we already have proxy_buffer_size 4096k, please suggest
> what should be ideal size for proxy_buffer_size in this scenario.
Yes, I saw that. But it looks like you have too long proxy_cache_key.
Or maybe, those files producing errors are just broken for some reason.
Can you read those files? Each cache file has the following parts in it:
- Serialized struct ngx_http_file_cache_header_t (unreadable characters in
the beginnig of the file). This one is small.
- Cache key in plaintext. You can easily see, if it's really long.
- Response header
- Response body
On Wed, Dec 07, 2016 at 06:00:34AM -0500, omkar_jadhav_20 wrote:
> I can open and read such cache files and below things are there inside these
> files :
> KEY: (this is one liner key)
> HTTP/1.1 200 OK
> etc. and at last a very long binary content.
Is this one of the files, which produce 'too long header' errors?
Is the file offset of the point, where the body starts, greater than 4096?
That part of the cache file (file header + key + HTTP header) should fit in
Yes this is one of those cache file for which we received said error.
I can see total size of this file is just 5300 bytes however we have set
proxy_buffer size set to 4096k
ls -lrt /cache/12054/1/fd/54ab395a128225b98118b08cf9d89fd1
x 5300 Dec 7 16:21 /cache/12054/1/fd/54ab395a128225b98118b08cf9d89fd1
On Wed, Dec 07, 2016 at 06:34:29AM -0500, omkar_jadhav_20 wrote:
> Yes this is one of those cache file for which we received said error.
> I can see total size of this file is just 5300 bytes however we have set
> proxy_buffer size set to 4096k
> ls -lrt /cache/12054/1/fd/54ab395a128225b98118b08cf9d89fd1
> x 5300 Dec 7 16:21 /cache/12054/1/fd/54ab395a128225b98118b08cf9d89fd1
Could you post hexdump -C of the file header (what's before the key) ?
nginx-1.4.0 is the version but there are many servers on which we have
installed nginx with version nginx-1.10.2 , giving same error:
below is hexdump output before KEY from those servers on which nginx with
version 1.10.2 is running :