Seemingly random 502 errors
tsamantanis
HOBBYOP
a year ago
We recently started experiencing seemingly random 502 errors in the HTTP logs which actually do not show up on the Deploy logs. It was unexpected since the deploy has been running for months without issues. The description of the 502 HTTP is usually either "failed to forward request to upstream: connection closed unexpectedly" or "failed to forward request to upstream: connection reset by peer" and we are unsure how to control these errors or handle them.
1 Replies
brody
EMPLOYEE
a year ago
Hello,
Failed to forward errors means your application failed to handle and or respond to the incoming request.
To help debug this, I recommend adding verbose logging and tracing to your application so that you can track down issues in your code.