This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pacman-helper: bring the big hammer against those timeout issues
For some reason (quota? but why would it be only occasionally?), BinTray recently started timing out on me frequently. Like, *frequently*. Like, *every single time* I needed to upload new packages, wasting my time trying to clean up inconsistent states (because the database cannot be uploaded transactionally, for technical reasons: BinTray does not allow different versions to use the same file path). The problem seems to occur only with the package database, where 16 relatively small files are uploaded in quick succession. So maybe it *does* have something to do with a usage quota. But why, then, does it succeed occasionally (and used to succeed all the time)? Be that as it may, we really need to get a working workaround for this issue because maintenance is hard enough and I do not exactly need the stress involved in a failed upload that leaves Git for Windows' Pacman repositories in a non-working state. So let's get out the big toolbox and throw *everything* we have at the problem. All of cURL's timeout options, set to 5 minutes (instead of the 20 seconds it seems to take to timeout). And since those options seem not to help even one bit, let's also look at the exit code (which is thankfully quite informative for cURL) and if we detect the same issue (exit code 7: Failed to connect to host), we sleep 5 seconds and try again. And again. And again. Until it succeeds, or until the sun burns out, whichever comes first. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- Loading branch information