Troubleshooting
Start with the response headers, then the origin logs. Most incidents are one of the four cases below.
Continuous cache misses
- Origin sets
cache-control: no-storeorprivate— Kestrel honours both. - The route has a
varylist containing a header your clients randomise. - Cookies are present and the route forwards them; cookies bypass the cache by design.
502 or 504 from the edge
502 means the origin refused or reset the connection. 504 means it accepted but did not answer within the connect/read budget. Check that the origin certificate is valid for the hostname in forward.host_header — a mismatch shows up as 502, not as a TLS error.
TLS not issuing
- Confirm the DNS record resolves to the edge addresses and is not proXied by another layer.
- Wait for the ACME retry window; failures back off from 1 to 30 minutes.
- If the hostname is behind another proxy, switch
tlstouploadand supply the certificate.
Unexpected 404
Routes are matched in order. A broad path_prefix: / placed first swallows everything after it. Move specific routes above it.
Diagnostic bundle
kestrel diag --host api.example.com --since 30m > diag.json
Attach that file to a support request; it contains route matches, cache decisions and origin timings for the window, and no request bodies.