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

[MDS-5300] Added health check probe to docman celery #2554

Merged

Conversation

simensma-fresh
Copy link
Collaborator

@simensma-fresh simensma-fresh commented Jun 6, 2023

Objective

MDS-5300

Added health check probe to Docman Worker (celery). This is an attempt to resolve the high cpu usage + restarts experienced with Celery in dev/test/prod using celery inspect ping for health checks.

It's a known issue with the current health checks that it can cause high CPU usage according to celery/celery#4079, and the solution is heavily inspired by the proposed solutions there.

Solution

  1. Have a "liveness file" regularly updated by the celery worker by using celery signals
  2. Update the OC liveness checks to see when the liveness file was latest updated, if it hasn't been updated in a while, the worker is not functioning properly, and the worker can be considered unhealthy

Gitops repo PR with updated health check: https://github.com/bcgov-c/tenant-gitops-4c2ba9/pull/33

Copy link
Contributor

@matbusby matbusby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thinking!

Copy link
Collaborator

@asinn134 asinn134 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@simensma-fresh simensma-fresh merged commit 86a5e1b into bcgov:develop Jun 6, 2023
7 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants