linuxmint / mintupgrade

42 stars 16 forks source link

Switch to Fastly to avoid slow upgrades and connection issues #87

Open clefebvre opened 3 months ago

clefebvre commented 3 months ago

Shortly after the announcements or during high load, the main repositories can get really busy.

This can result in a very slow upgrade, or even in connection issues and failures.

To avoid this, switch to the Fastly repositories. They are specifically designed for high load and high availability.

Open a terminal and type the following command to edit the sources list:

sudo xed /etc/apt/sources.list.d/official-package-repositories.list

In this file, find the line which contains virginia main upstream import backport and replace it with the line below:

deb https://fastly.linuxmint.io virginia main upstream import backport

Save the file with Ctrl+S and close the text editor.

Update the APT cache with the command below:

apt update

Make sure there are no errors in the output.

That's it, your system is now using the Fastly repositories. You can now perform the upgrade without worrying about high server load.

ScubaMan1970 commented 3 months ago

Thank you clefebvre. MintOS continues to breathe new life into my geriatric Deskpro 6200.

renatogfilhinho commented 3 months ago

Thank you!

iyousif commented 3 months ago

Thank you. Doing the upgarde now aws..

elidoz commented 3 months ago

thanks! should I change it back after the update?

DutchPete commented 3 months ago

In this file, find the line which contains virginia main upstream import backport

This does not occur in the equivalent LMDE file. However, is it possible to just add deb https://fastly.linuxmint.io virginia main upstream import backport to my LMDE file?

Dewillim commented 3 months ago

So cool that the Team is testing new solutions! Thanks a lot, @clefebvre !

atarax42 commented 3 months ago

I applied the change to the soures list, apt update shows no errors. But when I open mintupdate I get a notification that says, I should switch to another mirror server and https://fastly.linuxmint.io cannot be connected to. Edit: ping fastly.linuxmint.io shows no errors.

DutchPete commented 3 months ago

@atarax42 I got the exact same thing yesterday. Until then I had the software manager set up for Fastly and it worked well.

So now I wonder if LMDE'ers can use the Linux Mint Fastly site @clefebvre mentions in the OP.

Twixtfanatic commented 3 months ago

I inadvertently deleted line 2 when I deleted the old line 1. Line 2 began with a # symbol. Can anyone tell me what it should be? BTW if I had used emacs instead of xed it would have saved the old file for me. Thank you.

TheLinuxITGuy commented 3 months ago

I inadvertently deleted line 2 when I deleted the old line 1. Line 2 began with a # symbol. Can anyone tell me what it should be? BTW if I had used emacs instead of xed it would have saved the old file for me. Thank you.

Here's what mine looks like on LM 21.3:

# Do not edit this file manually, use Software Sources instead.

deb http://packages.linuxmint.com virginia main upstream import backport #id:linuxmint_main

deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Twixtfanatic commented 3 months ago

Thank you. Fortunately I took a snapshot with Timeshift before I started. FYI here is the line I am supposed to replace:

deb http://packages.linuxmint.com virginia main upstream import backport #id:linuxmint_main

Note the #id:linuxmint main at the end, which I believe I need to preserve when I edit.

commander-keen commented 3 months ago

I applied the change to the soures list, apt update shows no errors. But when I open mintupdate I get a notification that says, I should switch to another mirror server and https://fastly.linuxmint.io cannot be connected to. Edit: ping fastly.linuxmint.io shows no errors.

Same here on Linux Mint 21.3: 2024-07-29_Aktualisierungsverwaltung_001 @clefebvre Is there an additional step required maybe?

apt update looks fine to me (Issue is the same with http and https):

OK:1 http://ppa.launchpad.net/cdemu/ppa/ubuntu jammy InRelease OK:2 https://repo.steampowered.com/steam stable InRelease
OK:3 http://ppa.launchpad.net/mkusb/ppa/ubuntu jammy InRelease
OK:4 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Holen:5 http://ftp.hosteurope.de/mirror/archive.ubuntu.com jammy InRelease [270 kB] OK:6 http://ppa.launchpad.net/ubuntuhandbook1/avidemux/ubuntu jammy InRelease
Holen:7 https://mega.nz/linux/repo/xUbuntu_22.04 ./ InRelease [2.961 B]
OK:8 http://security.ubuntu.com/ubuntu jammy-security InRelease
OK:9 https://packages.microsoft.com/repos/ms-teams stable InRelease
Holen:10 https://download.mono-project.com/repo/ubuntu vs-bionic InRelease [5.144 B] OK:11 https://ppa.launchpadcontent.net/cappelikan/ppa/ubuntu jammy InRelease
OK:12 https://ppa.launchpadcontent.net/dupeguru/ppa/ubuntu jammy InRelease
OK:13 https://ppa.launchpadcontent.net/misery/ppa/ubuntu jammy InRelease
OK:14 https://ppa.launchpadcontent.net/strukturag/libde265/ubuntu jammy InRelease OK:15 https://ppa.launchpadcontent.net/tomtomtom/yt-dlp/ubuntu jammy InRelease OK:16 https://ppa.launchpadcontent.net/xtradeb/apps/ubuntu jammy InRelease
OK:17 https://packages.teejeetech.com/battery-monitor/free/ubuntu/focal/amd64 stable InRelease OK:18 http://ftp.hosteurope.de/mirror/archive.ubuntu.com jammy-updates InRelease OK:19 http://ftp.hosteurope.de/mirror/archive.ubuntu.com jammy-backports InRelease Ign:20 http://fastly.linuxmint.io virginia InRelease
OK:21 http://fastly.linuxmint.io virginia Release
Ign:22 https://repo.vivaldi.com/stable/deb stable InRelease OK:23 https://repo.vivaldi.com/stable/deb stable Release Es wurden 278 kB in 6 s geholt (50,3 kB/s). Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig Aktualisierung für 2 Pakete verfügbar. Führen Sie »apt list --upgradable« aus, um sie anzuzeigen.

The two packages being held back are python3-update-manager and update-manager-core (but that should not affect the reachablility of the server anyway...)

launching mintUpdate 6.0.9 from command line:

mintupdate /usr/lib/linuxmint/mintUpdate/mintUpdate.py:1379: DeprecationWarning: Gdk.threads_init is deprecated Gdk.threads_init() /usr/lib/linuxmint/mintUpdate/mintUpdate.py:1764: DeprecationWarning: Gdk.threads_enter is deprecated Gdk.threads_enter() /usr/lib/linuxmint/mintUpdate/mintUpdate.py:803: DeprecationWarning: Gdk.threads_leave is deprecated Gdk.threads_leave() Flatpak: done generating updates (28, 'Resolving timed out after 5000 milliseconds')

...results in a timeout.

I now found https://github.com/linuxmint/linuxmint/issues/658#issuecomment-2048477853:

python3 test.py http://packages.linuxmint.com --> 1722155345 http://fastly.linuxmint.io Traceback (most recent call last): File "/home/martin/Downloads/test.py", line 13, in c.perform() pycurl.error: (28, 'Resolving timed out after 5000 milliseconds')

I don't get it, because "ping fastly.linuxmint.io" shows no errors:

ping fastly.linuxmint.io PING t.sni.global.fastly.net (146.75.119.52) 56(84) bytes of data. 64 bytes from 146.75.119.52 (146.75.119.52): icmp_seq=1 ttl=59 time=30.3 ms 64 bytes from 146.75.119.52 (146.75.119.52): icmp_seq=2 ttl=59 time=30.3 ms 64 bytes from 146.75.119.52 (146.75.119.52): icmp_seq=3 ttl=59 time=33.3 ms 64 bytes from 146.75.119.52 (146.75.119.52): icmp_seq=4 ttl=59 time=31.0 ms 64 bytes from 146.75.119.52 (146.75.119.52): icmp_seq=5 ttl=59 time=29.8 ms 64 bytes from 146.75.119.52 (146.75.119.52): icmp_seq=6 ttl=59 time=23.4 ms

Altough the first start/ping takes roughly 4s or so, pretty close to 5000ms timeout maybe...?

ssusbauer commented 3 months ago

This does not occur in the equivalent LMDE file. However, is it possible to just add deb https://fastly.linuxmint.io virginia main upstream import backport to my LMDE file?

@DutchPete: The LMDE release is Faye, not Virginia. Using the wrong one could potentially break things. deb https://fastly.linuxmint.io faye main upstream import backport works fine for LMDE. Cinnamon has some big updates available.

LMDE is separate from Mint and does its own separate releases though. You are still going to be on LMDE 6, not Linux Mint 22. Wanted to make sure that's clear, a new Linux Mint version usually just means some package updates on LMDE.

DutchPete commented 3 months ago

@ssusbauer: Many thanks for your reply. So, this is what my official-package-repositories.list looks like:

deb https://fastly.linuxmint.io faye main upstream import backport 

deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb https://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://security.debian.org/ bookworm-security main contrib non-free non-free-firmware

deb https://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware

with the one for Faye at the top. May I assume the list is now OK as it is?

BTW, yes, I am aware LMDE is separate from Linux Mint and that I will still be on LMDE 6.

I also got this output in the terminal:

user1@lenovo:~$ sudo xed /etc/apt/sources.list.d/official-package-repositories.list
[sudo] password for user1:             

** (xed:76941): WARNING **: 18:11:58.136: Set document metadata failed: Setting attribute metadata::xed-spell-language not supported

Is that something I need to worry about? It does not seem so to me.

ssusbauer commented 3 months ago

@DutchPete yes that one looks reasonable.

DutchPete commented 3 months ago

@ssusbauer Thank you. And the terminal output is nothing to worry about?

ssusbauer commented 3 months ago

@DutchPete no, it is truly a just a warning that the file type does not support that spelling metadata. Nothing to worry about.

DutchPete commented 3 months ago

@ssusbauer thanks for your help and patience! Have a good day.

ErikDB87 commented 3 months ago

Should we change this line again after upgrading? Or leave it at fastly.linuxmint.io?

NeatNit commented 3 months ago

Thank you! I did this based on the blog instructions and the upgrade went smoothly.

I second the question: is it safe to leave it at fastly.linuxmint.io?

I also would like to know, would Fastly be added to the official mirrors list in Software Sources? Currently it's not in the list.

image

(In the screenshot: sorted alphabetically, there's no Fastly under F)

johnsageeek commented 3 months ago

thanks! should I change it back after the update?

No. Watch for updates to the Fastly trial and Mint will give you the updated verdict.

melroy89 commented 2 months ago

Should we change this line again after upgrading? Or leave it at fastly.linuxmint.io?

It's safe to leave it at fastly, however just know you are part of a beta-test. Since Fastly is officially in beta according to Clem (since April this year): https://forums.linuxmint.com/viewtopic.php?t=417369

Related GitHub ticket: https://github.com/linuxmint/linuxmint/issues/658

The test is still on-going. Since the ticket above isn't closed yet, I believe the Mint team is still collecting data and looking at the pricing.