Welcome! Log In Create A New Profile

Advanced

nginx zero byte response from non-zero file in cache

Vasil Mikhalenya
March 31, 2016 10:56AM
не понял,

в кеше файл есть, ответ апстрима был HTTP/1.1 200 OK, размер 394800, он же
на диске

однако nginx иногда отдает 200 OK и ноль байт

прошу, прощения за отсутствующий subject, поправил

On Thu, Mar 31, 2016 at 1:22 PM, Илья Шипицин <chipitsine@gmail.com> wrote:

> 304-й залип в кеше с пустым телом ?
>
> 2016-03-31 15:05 GMT+05:00 Vasil Mikhalenya <bazilek@gmail.com>:
>
>> Коллеги, подскажите почему nginx может иногда отдавать 200 OK и 0 байт в
>> ответе,
>> случается для HIT, MISS, EXPIRED
>>
>> du -mk /var/lib/nginx/cache/x/d/07/9933b0653bece6387a95b7ad7d15007d
>> 388 /var/lib/nginx/cache/x/d/07/9933b0653bece6387a95b7ad7d15007d
>>
>> head -n 10 /var/lib/nginx/cache/x/d/07/9933b0653bece6387a95b7ad7d15007d
>> D V0 V4 Va "33fcea30-60630"
>> KEY: http://x/hls/480p/1459415596925.ts
>> HTTP/1.1 200 OK
>> Server: nginx/1.8.0
>> Date: Thu, 31 Mar 2016 09:13:24 GMT
>> Content-Type: video/mp2t
>> Content-Length: 394800
>> Connection: close
>> Last-Modified: Thu, 31 Mar 2016 09:13:20 GMT
>> ETag: "33fcea30-60630"
>>
>> 2.61.162.132 - - [31/Mar/2016:09:13:37 +0000] "GET
>> /hls/480p/1459415596925.ts HTTP/1.1" 200 0 "x" "Mozilla/5.0 (Windows NT
>> 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0
>> Safari/537.36 Edge/13.10586" "-" 0.000 - - - HIT 394800
>>
>> где log_format combined_extra '$remote_addr - $remote_user [$time_local]
>> '
>>
>> '"$request" $status $body_bytes_sent '
>>
>> '"$http_referer" "$http_user_agent" "$http_x_forwarded_for" $request_time
>> $upstream_header_time $upstream_response_time $upstream_response_length
>> $upstream_cache_status $upstream_http_content_length';
>>
>> Спасибо
>>
>> --
>> Best regards,
>> Vasil Mikhalenya
>>
>> _______________________________________________
>> nginx-ru mailing list
>> nginx-ru@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>>
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>



--
Best regards,
Vasil Mikhalenya
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

nginx zero byte response from non-zero file in cache

Vasil Mikhalenya March 31, 2016 10:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

dvp
Guests: 201
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready