mastodon_ynh
mastodon_ynh copied to clipboard
Upgrade takes forever
Describe the bug
Upgrade is on hour 20 and is still not done.
Context
- Hardware: VPS bought online
- YunoHost version: 11.2.8.2
- I have access to my server: Through SSH & through the webadmin
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
- Using, or trying to install package version/branch: 4.2.3
- If upgrading, current package version: 4.2.1
Steps to reproduce
Click upgrade and wait until the end of time.
Expected behavior
Not to take 20 hours+ to upgrade
Logs
So we are still waiting for the upgrade to complete. My question of sorts is if there is a way to trim down the backup process. Mine is 112.3 GB and if you have more than that, God help you. Maybe just back up the basic user account information (username, password, bio info) and the server info. Not all the threads, media and such.
Thanks for all your hard work!
Mastodon is disk space intensive. There are currently two bottlenecks you may run into:
- It is currently not possible to exclude /var/www/mastodon/live/cache cache files from the backup.
- The upgrade script resets file permissions on EVERY file in the /var/www/mastodon tree, twice at least.
For now, to keep down the time you could run clean up tasks and minimize the number of days your cache keeps. See https://codeberg.org/Fedimins/mastodon-maintenance-tasks for some inspiration.
why does the upgrade script reset file permissions ? it's why it takes all that time even without backup ...
- The upgrade script resets file permissions on EVERY file in the /var/www/mastodon tree, twice at least.
Where did you see that?
if you’re talking about this, it’s not what you think:
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
# Create a permission if needed
if ! ynh_permission_exists —-permission="api"; then
ynh_permission_create —-permission="api" --url="/api" —-allowed="visitors" —-auth_header="false" —-show_tile="false" —-protected="true"
fi
https://github.com/YunoHost-Apps/mastodon_ynh/blob/36c4f111532a6e0fda494de4f6b0b15fca1730ec/scripts/upgrade#L194-L195 Not sure those lines are required.