Kestrel
Docs · v4.8

Troubleshooting

Start with the response headers, then the origin logs. Most incidents are one of the four cases below.

Continuous cache misses

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

  1. Confirm the DNS record resolves to the edge addresses and is not proXied by another layer.
  2. Wait for the ACME retry window; failures back off from 1 to 30 minutes.
  3. If the hostname is behind another proxy, switch tls to upload and 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.