caddy-s3-proxy
caddy-s3-proxy copied to clipboard
Keys sometimes not delivered from Minio
I am running into a case where I am hosting static webpages with S3 proxy and they don't load completely when revisited, because Minio remembers that the file didn't change since last lookup (by the proxy), and doesn't serve it.
Apr 07 04:05:01 geogale docker-compose[2140543]: caddy_1 | {"level":"error","ts":1617761101.037653,"logger":"http.handlers.s3proxy","msg":"failed to get object","bucket":"libre","key":"gartenkarte.de/images/20130530__georilla__gartenplane.jpg","err":"{id=168tm4dqz} caddy-s3-proxy.convertToCaddyError (errors.go:113): HTTP 304: NotModified: Not Modified\n\tstatus code: 304, request id: 167371266EBAF83A, host id:"}
Interestingly, exactly every second refresh to https://gartenkarte.de works, while every other fails with
Apr 07 04:13:21 geogale docker-compose[2262171]: caddy_1 | {"level":"warn","ts":1617761601.2035916,"logger":"http.handlers.s3proxy","msg":"error when looking for index","bucket":"libre","key":"gartenkarte.de/","err":"NoSuchKey: The specified key does not exist.\n\tstatus code: 404, request id: 1673719AE2F16B68, host id: "}
The site is configured with
:80 {
log
respond /health-check "OK" 200
route * { # before I had /*, but same effect
s3proxy {
region "eu-central-1"
bucket "libre"
endpoint "http://10.14.208.2:9000"
root "gartenkarte.de"
force_path_style
}
}
}
and terminated by Traefik. This is what it looks like from the client:
You can see there's also something funny going on with the favicons, which seem to work when the site isn't.
Would #33 be able to help here in any case, e.g. by deactivating cache?
Note we can already mingle headers with
- request_header (Caddyfile directive) — Caddy Documentation
- header (Caddyfile directive) — Caddy Documentation
but no experiments seem to have worked out.
The strange thing here is for me, that exactly every second request fails, tested with multiple clients.
What else can I do to investigate this more thoroughly, and to stabilise delivery?