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

CRON job to perform maintenance on db with old and inactive accounts #59

Open
fabd opened this issue Jan 31, 2017 · 0 comments
Open

CRON job to perform maintenance on db with old and inactive accounts #59

fabd opened this issue Jan 31, 2017 · 0 comments

Comments

@fabd
Copy link
Owner

fabd commented Jan 31, 2017

The database is now above 2 GB on the web host. Really need to start thinking about periodical cleanup of the database, potentially through a CRON job.

Unused accounts is the easiest to address.

Accounts that are routinely created but not used, usually with 0 cards and 0 stories, free up next to no space... but they do free up usernames. These can be deleted without much worry, criteria may be : not logged within amonth, 0 cards, 0 stories => permanently delete

Old inactive accounts

For inactive accounts one idea would be to create a separate database to store inactive accounts.

CRON job would match a criteria, and move this data to a separate database, say any inactive acount since 6 months to a year.

A button in the user settings could allow the user to retrieve their data. Or maybe just tell people to contact as this is a realtively low occurence?

The advantage of moving inactive accounts to a separate db is that I don't need to worry about criteria. Since we don't lose data. BUT the main database will be smaller, and faster. AND we don't need to worry about backing up the "inactive accounts" db because in the worst case if it was deleted or lost, they are inactive accounts anyway.

I prefer this solution to all out deleting from main db based on criteria because you never know. Users coming back after a long break is not uncommon with Kanji Koohii. I get emails now and then from such users who want to reset their SRS, or trying to log back in their old accounts...

@fabd fabd added backend and removed backend labels Jan 31, 2017
@fabd fabd closed this as completed Jan 31, 2017
@fabd fabd self-assigned this Jun 20, 2017
@fabd fabd added this to the Backend / Performance improvements milestone Jun 20, 2017
@fabd fabd changed the title Write a script / task to phase out old, unused accounts to free up usernames CRON job to perform maintenance on db with old and inactive accounts Jun 20, 2017
@fabd fabd reopened this Jun 20, 2017
@fabd fabd removed the in-progress label Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant