Page MenuHomePhabricator

A poor internet connection should not result in a HTTP 503 error
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Switch to the 2010 source editor
  2. Either (A) go out away from civilization until you almost have no cell service, then connect through your mobile hotspot or (B) simulate a bad connection with a command like tc qdisc add dev wlan0 root netem loss 50%
  3. Go to a large page like https://en.wikipedia.org/wiki/United_States
  4. Click "edit", and make sure everything has finished loading
  5. Click "show preview"

What happens?:

Request from [redacted] via cp4043 cp4043, Varnish XID 406723674
Error: 503, Backend fetch failed at Sun, 28 Jan 2024 21:35:32 GMT

What should have happened instead?:

A preview is shown if all the data was received uncorrupted; otherwise a more meaningful error message is shown.

Other information (browser name/version, screenshots, etc.):

Happens to me in Firefox 121.0.1 (Linux) using the tc command above, on Debian 11. Has also happened to me "in the wild" in the past.

Event Timeline

There was an outage tonight, do you still receive the same error each time?

Just tried again, this time with Chromium and the same tc settings, and the got the same error (Varnish XID 492021032). This is not a new problem; I just got around to reporting it now.

sadly varnish is not able to tell between a client that goes away earlier than expected (by poor Internet access) triggering a backend fetch error from an actual backend fetch error where the client connection is healthy but varnish is unable to reach the backend server.

In this case the client goes away triggering an early/unexpected connection close between varnish and its backend server, As a result varnish returns the 503 based on that backend server connection close.