YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
84 stars 34 forks source link

WARNING: the upgrade to v4 takes more than 5 hours (here) but is OK #351

Closed isAAAc closed 1 year ago

isAAAc commented 1 year ago

NB: this is not really an issue (yet ^^)

I'm trying to upgrade to version 4 for the third time, Maybe I'm in too much of a hurry, but the first two times, the backup process froze, it seems. I used the command in the readme this time (the first few times I just ran yunohost app upgrade mastodon.

I ran the correct command in a tmux, it's in progress, I'll let you know the result ;)

isAAAc commented 1 year ago

more than one hour on this step:

2022-11-26 23:34:56,942 DEBUG    yunohost.hook (unknown function) - [14287.1] 77348 Backup script completed for mastodon. (YunoHost will then actually copy those files to the archive).
2022-11-26 23:34:56,943 DEBUG    yunohost.hook (unknown function) - [14287.1] 77348 + ynh_exit_properly
2022-11-26 23:34:56,943 DEBUG    yunohost.hook (unknown function) - [15128.1] + '[' 0 -eq 0 ']'
2022-11-26 23:34:56,944 DEBUG    yunohost.hook (unknown function) - [14287.1] 77349 + local exit_code=0
2022-11-26 23:34:56,944 DEBUG    yunohost.hook (unknown function) - [15128.1] + exit 0
2022-11-26 23:34:56,945 DEBUG    yunohost.hook (unknown function) - [14287.1] 77350 + rm -rf /var/cache/yunohost/download/
2022-11-26 23:34:56,946 DEBUG    yunohost.hook (unknown function) - [14287.1] 77351 + '[' 0 -eq 0 ']'
2022-11-26 23:34:56,947 DEBUG    yunohost.hook (unknown function) - [14287.1] 77352 + exit 0
2022-11-26 23:34:57,949 DEBUG    yunohost.backup (unknown function) - [15128.1] Backup permission for mastodon
2022-11-26 23:34:57,950 DEBUG    yunohost.hook (unknown function) - [14287.1] 78357 Backup permission for mastodon
2022-11-26 23:34:58,116 DEBUG    yunohost.utils.ldap (unknown function) - initializing ldap interface
2022-11-26 23:34:58,117 DEBUG    yunohost.hook (unknown function) - [14287.1] 78523 initializing ldap interface
isAAAc commented 1 year ago

ok, it's alive:

2022-11-26 23:34:58,117 DEBUG    yunohost.hook (unknown function) - [14287.1] 78523 initializing ldap interface
2022-11-27 00:46:15,815 INFO     yunohost.backup (unknown function) - [15128.1] Creating a backup archive from the collected files...
2022-11-27 00:46:15,855 DEBUG    yunohost.hook (unknown function) - [14287.1] 4356222 Creating a backup archive from the collected files...
2022-11-27 00:46:15,864 INFO     yunohost.backup (unknown function) - [15128.1] The archive will contain about 59.2GiB of data.
2022-11-27 00:46:15,865 DEBUG    yunohost.backup (unknown function) - [15128.1] Creating the backup TAR archive...
2022-11-27 00:46:15,878 DEBUG    yunohost.hook (unknown function) - [14287.1] 4356272 The archive will contain about 59.2GiB of data.
2022-11-27 00:46:15,878 DEBUG    yunohost.hook (unknown function) - [14287.1] 4356272 Creating the backup TAR archive...
isAAAc commented 1 year ago

still on it:

2022-11-27 00:46:15,878 DEBUG    yunohost.hook (unknown function) - [14287.1] 4356272 Creating the backup TAR archive...

i don't understand why this is so long

isAAAc commented 1 year ago

version: 4.0.2~ynh1 the lock was delivered at:

2022-11-27 04:54:23,382 SUCCESS  yunohost.app (unknown function) - [14287.1] Upgrade complete
2022-11-27 04:54:23,522 DEBUG    moulinette.actionsmap process - action [14287.1] executed in 19258.518s
2022-11-27 04:54:23,524 DEBUG    moulinette.core release - lock has been released

so 5.34 hours for the upgrade to complete.

thx for your work ;)

(feel free to close the "issue", i keep it open to warn people about the duration of the upgrade ;) )

Tagadda commented 1 year ago

Hey there~ I'm glad the upgrade finally went well! Could you share the full upgrade logs with yunopaste ?

isAAAc commented 1 year ago

@Tagadda of course ;) https://paste.yunohost.org/raw/tavizegaka

panomaki commented 1 year ago

Bear in mind when upgrading that the whole mastodon-installation will be backed up. Consider that this could be a gigabyte operation; on my instance (180 users), that would have been >80GB without manual adjustments (run tootctl to clean up the cache). That would explain your long duration. You may want to check your disk use and consider deleting the backup after succesful upgrade.

memo-567 commented 1 year ago

It would also be interesting to know what hardware you are using for YunoHost and Mastodon.

The update took round about 5 Minutes here without media. Files are stored on AWS S3.

isAAAc commented 1 year ago

yes sure, sorry for the missing @memo-567

Context

@panomaki : yes, the prompt/logs told there was 50G to backup, i just think it is less than my peertube size wich is faster to backup, my instance has less than 10 users

memo-567 commented 1 year ago

Hardware: VPS bought online

Doesn't say anything about the CPU or memory ¯\_(ツ)_/¯ But backing up 50G is indeed a heavy job.

isAAAc commented 1 year ago

at this moment:

free -h
               total        used        free      shared  buff/cache   available
Mem:            13Gi       7.1Gi       218Mi       391Mi       6.0Gi       5.5Gi
Swap:          5.9Gi       165Mi       5.7Gi
cat /proc/cpuinfo | grep -i "^processor" | wc -l
8
cat /proc/cpuinfo | grep -i "^model name" | awk -F": " '{print $2}' | head -1 | sed 's/ \+/ /g'
Common KVM processor

vendor_id   : GenuineIntel

cat /proc/cpuinfo | grep -i "^cpu MHz" | awk -F": " '{print $2}' | head -1
2399.998

with many services running:

yunohost app list | grep name
    name: Anarchism
    name: Wiki
    name: Funkwhale
    name: HedgeDoc
    name: Invidious
    name: Jirafeau
    name: Kanboard
    name: Keeweb
    name: Mastodon
    name: Mattermost
    name: Mobilizon
    name: tzet (wordpress)
    name: KrashCatz (webapp site)
    name: NetData
    name: Nextcloud
    name: OpenSondage
    name: KrashTube (peertube)
    name: Pixelfed
    name: Prosody
    name: Roundcube
    name: Searx
    name: Send
    name: Vaultwarden
    name: Wallabag
    name: WemaWema
    name: Wiki.js
    name: KrashWar (wordpress)
    name: h0nk.xyz (wordpress)
    name: Zerobin

;)

memo-567 commented 1 year ago

That should be more than enough 😀 Then the long time is probably due to the huge amount of data.

panomaki commented 1 year ago

That should be more than enough grinning Then the long time is probably due to the huge amount of data.

Including - and that's the difference I think with peertube - a lot of (tiny) files:

user@server:# mlocate -c /var/www/mastodon 2022614

isAAAc commented 1 year ago

mlocate -c /var/www/mastodon 1284312

well as i said, you can close this when you want, it was just to inform it could take several time to upgrade ;)