Osc build constantly aborts due to IncompleteRead errors

When I use osc build, it often fails to download the required packages, aborting with a “Connection broken: IncompleteRead” error:

$ osc build --sccache openSUSE_Tumbleweed x86_64 seamonkey.spec
Building seamonkey.spec for openSUSE_Tumbleweed/x86_64
Using local file: seamonkey.spec
Getting buildconfig from server and store to /home/psy/obs/home:psych0naut:branches:mozilla/seamonkey/.osc/_buildconfig-openSUSE_Tumbleweed-x86_64
Getting buildinfo from server and store to /home/psy/obs/home:psych0naut:branches:mozilla/seamonkey/.osc/_buildinfo-openSUSE_Tumbleweed-x86_64.xml
Updating cache of required packages
87.0% cache miss. 67/517 dependencies cached.

[1/450] (openSUSE:Tumbleweed) cargo1.84-1.84.1-2.1.x86_64.rpm                                                                                                              100% Time: 0:00:01
Connection broken: IncompleteRead(7519951 bytes read, 157552237 more expected)

If I immediately rerun the command, it will try again and might successfully download the package it got stuck on, and maybe a few more, before aborting again. Needless to say, this makes building a package with hundreds of uncached dependencies a very time-consuming process.

The problem is not specific to any one computer or network I use. I experience it on my home desktop, on my work desktop, and on my laptop that I use when roaming. The problem’s been occurring for me for months now—maybe even a year or more.

Is it the openSUSE download servers that are at fault here? If so, why does this problem never occur when I run zypper dup? Is there any option I can pass to osc that will make it retry failed downloads? (I could wrap the call to osc build in a loop that checks the return value, but I suspect this won’t distinguish between the command failing due to a download failure vs. due to a compilation error.)

If the problem is indeed on my end, how would I go about diagnosing it?

Run with

osc -H ...

to see HTTP interaction.