nginx serving files from the store returns Last-Modified = Epoch

OpenSubmitted by Robert Vollmert.
Details
3 participants
  • Gábor Boskovits
  • Ludovic Courtès
  • Robert Vollmert
Owner
unassigned
Severity
normal
Merged with
R
R
Robert Vollmert wrote on 9 Jan 2020 11:52
nginx caching headers are broken due to epoch store timestamps
(address . bug-guix@gnu.org)
D0AAA75A-E814-4BDA-9974-70DC168073F6@vllmrt.net
I’ve been having hard-to-debug caching issues serving up static files
with nginx. It turns out this is due to nginx computing e-tag headers
from file timestamps, which are all epoch in the guix store.

I’ve fixed this on my server by applying a patch from Nix:
G
G
Gábor Boskovits wrote on 9 Jan 2020 12:00
(name . Robert Vollmert)(address . rob@vllmrt.net)(address . 39051@debbugs.gnu.org)
CAE4v=pj=3txU+euM8t=LXP+3dMBUPeLczmPhTw0V8SrKbpTCRg@mail.gmail.com
Hello,

Robert Vollmert <rob@vllmrt.net> ezt írta (időpont: 2020. jan. 9., Cs, 11:54):
Toggle quote (8 lines)
>
> I’ve been having hard-to-debug caching issues serving up static files
> with nginx. It turns out this is due to nginx computing e-tag headers
> from file timestamps, which are all epoch in the guix store.
>
> I’ve fixed this on my server by applying a patch from Nix:
> https://github.com/robx/guix/commit/4b406f5bc608b3c0e18e15795d8fe61d3477a3e2

this is a known issue. Could you look around the tracker and merge?
Toggle quote (5 lines)
>
>
>
>

Also, on the long run it would be nice to contribute a working etags
computation to nginx, that
is based on the file content hash, or something like that. Does that make sense?

Best regards,
g_bor
--
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21
R
R
Robert Vollmert wrote on 9 Jan 2020 13:12
(name . Gábor Boskovits)(address . boskovits@gmail.com)(address . 39051@debbugs.gnu.org)
155F39DF-2BE3-44B7-BBB6-22E89A7A4DB0@vllmrt.net
Toggle quote (27 lines)
> On 9. Jan 2020, at 12:00, Gábor Boskovits <boskovits@gmail.com> wrote:
>
> Hello,
>
> Robert Vollmert <rob@vllmrt.net> ezt írta (időpont: 2020. jan. 9., Cs, 11:54):
>>
>> I’ve been having hard-to-debug caching issues serving up static files
>> with nginx. It turns out this is due to nginx computing e-tag headers
>> from file timestamps, which are all epoch in the guix store.
>>
>> I’ve fixed this on my server by applying a patch from Nix:
>> https://github.com/robx/guix/commit/4b406f5bc608b3c0e18e15795d8fe61d3477a3e2
>
> this is a known issue. Could you look around the tracker and merge?
>>
>>
>>
>>
>
> Also, on the long run it would be nice to contribute a working etags
> computation to nginx, that
> is based on the file content hash, or something like that. Does that make sense?
>
> Best regards,
> g_bor
> --
> OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21
L
L
Ludovic Courtès wrote on 11 Jan 2020 22:23
control message for bug #37207
(address . control@debbugs.gnu.org)
87y2udu1pk.fsf@gnu.org
merge 37207 39051
quit
L
L
Ludovic Courtès wrote on 11 Jan 2020 22:24
Re: bug#39051: nginx caching headers are broken due to epoch store timestamps
(name . Gábor Boskovits)(address . boskovits@gmail.com)
87tv51u1o4.fsf@gnu.org
Hi,

Gábor Boskovits <boskovits@gmail.com> skribis:

Toggle quote (13 lines)
> Hello,
>
> Robert Vollmert <rob@vllmrt.net> ezt írta (időpont: 2020. jan. 9., Cs, 11:54):
>>
>> I’ve been having hard-to-debug caching issues serving up static files
>> with nginx. It turns out this is due to nginx computing e-tag headers
>> from file timestamps, which are all epoch in the guix store.
>>
>> I’ve fixed this on my server by applying a patch from Nix:
>> https://github.com/robx/guix/commit/4b406f5bc608b3c0e18e15795d8fe61d3477a3e2
>
> this is a known issue. Could you look around the tracker and merge?

Done. Previous discussion:


Thanks,
Ludo’, also eager to see a proper fix!
L
L
Ludovic Courtès wrote on 11 Jan 2020 22:25
control message for bug #37207
(address . control@debbugs.gnu.org)
87sgklu1m4.fsf@gnu.org
retitle 37207 nginx serving files from the store returns Last-Modified = Epoch
quit
?