We are also regularly bumping into this issue. Part of our build process gathers changed Debian packages w.r.t. a reference environment, such that the packages can be updated in an offline environment. The packages are gathered by means of a `dist-upgrade --download-only` invocation of apt-get. This can easily result in hundreds of packages being downloaded in one operation.
Our local APT mirror server is served through nginx/1.18.0. The Undetermined Error is obviously caused by the `keepalive_requests` setting of Nginx. It defaulted to 100, hence we saw download failures on Gets with indices that were multiples of 100 (not consistently, only occasionally). Then we bumped keepalive_requests to 1000, and the randomly failing builds went away, until we had to handle a distribution upgrade in our builds, which resulted in more than 1000 packages to be downloaded in a single operation: Get:999 http://our.local.mirrror/jammy-merged-20220816 jammy/main amd64 liblapack3 amd64 3.10.0-2ubuntu1 [2504 kB] Get:1000 http://our.local.mirrror/jammy-merged-20220816 jammy/main amd64 liblbfgsb0 amd64 3.0+dfsg.3-10 [29.9 kB] Err:1000 http://our.local.mirrror/jammy-merged-20220816 jammy/main amd64 liblbfgsb0 amd64 3.0+dfsg.3-10 Undetermined Error [IP: 192.168.123.45 80] The APT config has `Acquire::Retries "10";` but this does not seem to help with this particular failure. So, now we have further bumped keepalive_requests to 2000, but this feels like a game of whack-a-mole. Regards, Alexander