Reverse proxy backend unavailable errors

I’d like help learning why Caddy decides that my backend is unreachable. I’m running Caddy as a reverse proxy between 4 processes. It’s been working great. Until I noticed that occasionally Caddy sends ‘502 unreachable backend’ errors.

I don’t know where to look to see if Caddy can reach the server processes, or if it has flagged them all as unhealthy. The backend servers do occasionally respond with 500 statuscodes. What other things can make them look unhealthy? How do I check their status?

My configuration file looks like: {
  tls ..
  proxy / :3000 :3001 :3002 :3003 {
    proxy_header X-Forwarded-For {remote}
    proxy_header Host {host}
  log ...
  errors {
    log ...
caddy -version
Caddy 0.8.3

Thanks for your help

Please upgrade to the latest Caddy version and let us know if it still happens along with the error message. Thanks :wink:

(This won’t fix the 500 errors being returned by the backend, of course – a server responding with a 500 is having trouble, but default behavior for that has changed, so please read the proxy docs to know how it works now.)

Thanks Matt, I’ll give it a go.

Okay, we’ve upgraded to 0.9.3. I’ve read the docs for proxy and the defaults look great. Thanks.

1 Like