A lot of Pacman Mirrors are out of sync

I checked https://repo.manjaro.org/ a couple of times in recent days and found that a lot of the mirrors are out of date. Thus I was wondering if there is a general known problem with pacman-mirrors?

As a sidenote, the webpage doesn’t seem to have an expiry header. This causes browsers to cache and display an outdated version of the page. Only forcefully reloading the page displays an up to date version.

1 Like

pacman-mirrors is a tool for selecting your preferred mirrors. Just because the mirrors are out of sync — which does of course happen, depending on how often each mirror syncs with the rest and how much bandwidth each respective mirror has at its disposal— doesn’t mean that there would be anything wrong with the tool itself (apart from any existing bugs).

Pinging @codesardine:stuck_out_tongue:

2 Likes

Thank you for responding so quickly! I take it your remark means I selected an incorrect tag. Sorry, about that and thank you for telling me. I do have an issue with pacman-mirrors as well. I seems to run early during the system boot when my internet connection is not set up yet, resulting in a random mirror list, instead one sorted by access speed. I should report this in a separate thread, though.

I understand that some mirrors are out of sync sometimes, but for the last couple of days the vast majority of mirrors were out of sync, even servers that are known to have a huge bandwidth. Therefore I was wondering if there are some known issues in the mirroring process that keeps those mirrors from syncing properly.

The following two commands will stop, disable and mask the systemd units that automatically update the mirror lists. :arrow_down:

sudo systemctl disable --now pamac-mirrorlist.service pamac-mirrorlist.timer
sudo systemctl mask pamac-mirrorlist.service pamac-mirrorlist.timer

Note that if you issue these two commands, you will periodically have to manually update the mirror lists by way of the pacman-mirrors command.

That is always possible, but I’m no expert on that. I’m guessing that it all depends on the admins of the respective mirrors, although I also do believe that certain conditions need to be met in terms of bandwidth and availability. The @admins can tell you more about that. :slight_smile:

1 Like

pacman-mirrors get the mirror status from the repo server

The recommended sync interval for mirrors are 4-6 hours - some sync every 5 minutes - that depends on the mirror provider.

Seems that state of the mirrors has normalized. Not sure if anyone did anything. Thank you all for your responses.

@codesardine
The only issue that remains, is that the mirrors page is cached by browsers. I just checked the page properties in my browser and the header in the response has

Expires: Thu, 31 Dec 2037 23:55:55 GMT

This means anyone who ever looks at the page will, in the worst case, see the same page if visited again for about 15 years.

<head>
    <meta charset="utf-8">
    <title>Manjaro Repository - Status of mirrors</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta http-equiv="refresh" content="300">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <link href="../data/css/style.min.css" rel="stylesheet">
    <link rel="icon" href="../data/img/manjaro.png">
</head>

Even if the page is cached - it should reload every 5 minutes.

Only if you leave that page open for 15 years, the browser does not cache html, only static assets like images or files, those never change and the page get rebuild every 20min.

@codesardine
What makes you think html pages are not cached? The result of every HTTP-request can potentially be cached. In practice, though, only GET-request can and will be cached by default, unless the response header says otherwise. You can check the RFC for this RFC 9111 - HTTP Caching

Steps to reproduce:
1 Open https://repo.manjaro.org/ in chromium
2 Look at date generated in the top right
3 Close the page
4 Leave chromium open for a few hours/days
5 Open https://repo.manjaro.org/ again

Expected result:
Generated date is more or less current

Actual result:
The generated date (and all the data on the page) is the same as when the page was first displayed. For me this is the date I last forcefully reloaded the page. It says Generated on 2022-06-29 14:43. And it will be that same if I close the page now and reopen it tomorrow or next week.

But refreshing only happens if you leave the page open for 5 minutes. If you just open it, you will see the old page. If you close it before staring at it for 5 minutes, open it days later, you will still see the old page. Simply adding no cache or a small caching value like 5 minutes will make the page behave properly.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.