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

Automate the deletion of old Gems from servers #894

Open
lin-d-hop opened this issue Aug 15, 2023 · 1 comment
Open

Automate the deletion of old Gems from servers #894

lin-d-hop opened this issue Aug 15, 2023 · 1 comment

Comments

@lin-d-hop
Copy link
Contributor

lin-d-hop commented Aug 15, 2023

Description

@dacook has recently discovered that old and unused gems on servers just hang there, stagnant, waiting to crash the entire server as memory fills. They are a potential silent killer and you know how we feel about silent killers?
We get to them when they actually break everything, just like everything else we do.

For example, on DE there was about 9gb of unused old gems (over 20% of the disk!).

Acceptance Criteria & Tests

  1. Add to the deployment/provision scripts an automated task to remove all old and unused gems. I'm not actually clear about how we'll do this so perhaps @dacook can add some more details.
@dacook
Copy link
Member

dacook commented Aug 16, 2023

Thanks Lynne, I propose we remove all unused gems (including older versions) as part of each deploy. It turns out there's already a simple command for that (bundle clean).

If we do it before installing new gems, the previous version of any newly-upgraded gems will remain on the server until the next deploy, which will be helpful in the event of a rollback (although I'm not sure we've ever done that).

If any gem is removed that is later needed again, it can simply be re-downloaded.

I think it will be a very simple change, but will fight the temptation to do it right now..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: All the things 💤
Development

No branches or pull requests

2 participants