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

Clean CKAN BEAKER_CACHE on a regular basis #4985

Open
FuhuXia opened this issue Nov 26, 2024 · 1 comment
Open

Clean CKAN BEAKER_CACHE on a regular basis #4985

FuhuXia opened this issue Nov 26, 2024 · 1 comment
Labels
bug Software defect or bug
Milestone

Comments

@FuhuXia
Copy link
Member

FuhuXia commented Nov 26, 2024

We need to repeat the what we did in #4657 on a semi-annual schedule to reduce the size of BEAKER_CACHE table in catalog app.

Steps:

  1. Enable space SSH for prod space
  2. connect to catalog-db (need Service Connect CF plugin installed.
 cf connect-to-service catalog-admin catalog-db
  1. Run query
DELETE FROM beaker_cache WHERE created < CURRENT_TIMESTAMP - INTERVAL '2 day';

This query will take a few mins to complete. If the connection is disconnected due to catalog-admin gets restarted, the query will continue on its own. You can verify it when you see the oldest CREATED is a two days ago instead of 6 months ago by query

 SELECT CREATED FROM beaker_cache ORDER BY id LIMIT 1;
 SELECT COUNT(*) FROM beaker_cache;
  1. Set the milestone to next 6 month and put the ticket back to icebox,
@FuhuXia FuhuXia added the bug Software defect or bug label Nov 26, 2024
@FuhuXia
Copy link
Member Author

FuhuXia commented Nov 26, 2024

Done on 2024-11-26. Setting milestone to May 2025.

@FuhuXia FuhuXia moved this to 🧊 Icebox in data.gov team board Nov 26, 2024
@FuhuXia FuhuXia added this to the May 2025 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software defect or bug
Projects
Status: 🧊 Icebox
Development

No branches or pull requests

1 participant