Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade takes forever #424

Open
BishopGreer opened this issue Dec 14, 2023 · 4 comments
Open

Upgrade takes forever #424

BishopGreer opened this issue Dec 14, 2023 · 4 comments

Comments

@BishopGreer
Copy link

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!

@panomaki
Copy link
Contributor

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.

@Olm-e
Copy link

Olm-e commented Feb 2, 2024

why does the upgrade script reset file permissions ? it's why it takes all that time even without backup ...

@OniriCorpe
Copy link
Member

OniriCorpe commented Feb 18, 2024

  • 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

@Tagadda
Copy link
Member

Tagadda commented Feb 18, 2024

chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"

Not sure those lines are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants