FS#71084 - Please don't disable mirrors with a lot of 404 responses

Attached to Project: Pacman
Opened by lilydjwg (lilydjwg) - Tuesday, 01 June 2021, 13:01 GMT
Last edited by Allan McRae (Allan) - Saturday, 12 June 2021, 06:52 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 6.0.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No


Summary and Info:

In  FS#29293  pacman now disables mirrors that produce three errors. If it's 502, or timeout, or an expired certificate, this action is good. But when it's 404, it's OK to try with other packages.

I configure my system so that pacman downloads package databases (-Sy) from mirrors that sync frequently (and thus know about newer packages) but when actually downloading packages, it tries another mirror first for higher speed, and if not found pacman can try other mirrors until it finds the package.

Here there are university mirrors that sync frequently but due to high load and other issues they are not as fast and stable as mirrors from commercial companies. The latter have better networking, are much more stable, but sync much less (mostly once a day).

Steps to Reproduce:
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 12 June 2021, 06:52 GMT
Reason for closing:  Duplicate
Additional comments about closing:  FS#23407
Comment by lilydjwg (lilydjwg) - Wednesday, 02 June 2021, 08:26 GMT
Another error that should not cause the mirror to be disabled is "HTTP server doesn't seem to support byte ranges. Cannot resume." I'm not sure why it occurs (the mirrors do support byte ranges) but that a mirror doesn't support byte ranges doesn't mean the mirror cannot be used for whole file downloads.
Comment by Mike Kazantsev (mk-fg) - Saturday, 12 June 2021, 06:27 GMT
Also have slightly different use-case for this feature - local http package cache shared between multiple machines, which one-way rsync --remove-source packages there from their /var/lib/cache/pacman/pkg.
Such cache cannot have all new packages in an update, but still helps immensely on a slow/congested internet connection, without requiring each machine to store all these files separately.

One obvious fix might be to expose "server_error_limit = 3" value in pacman.conf, so that I can disable it for such use-case.