Skip to content

healthcheck: configurable database delay #9381

Closed

Description

@matifali

The delay to mark the database as unhealthy should be configurable. currently, it looks like hardcoded to 15 milliseconds.

if latency < 15*time.Millisecond {
r.Healthy = true
}

I have a deployment where the remote db has 28-29 ms latency, and Coder is marking it as unhealthy.

image

Activity

  1. Emyrk commented on Aug 28, 2023

    @Emyrk
    Member

    It would be nice if we could display a warning. I think the site might be quite slow with a slow db latency because of how many round trips we make.

  2. matifali commented on Aug 28, 2023

    @matifali
    ContributorAuthor

    @Emyrk, for context, this deployed on fly.io with Postgres in the same region, and I should investigate why the latency is that high, too.

  3. Emyrk commented on Aug 28, 2023

    @Emyrk
    Member

    I understand for test deployments this is common. But we should display some warning that tells the user things will work, but this is not ideal.

  4. added this to the healthcheck GA milestone on Sep 19, 2023
  5. johnstcn commented on Nov 10, 2023

    @johnstcn
    Member

    Grabbing this one.

  6. self-assigned this
    on Nov 10, 2023
  7. matifali commented on Nov 10, 2023

    @matifali
    ContributorAuthor

    @johnstcn I think we should instead do it as three health levels.
    delay < 15 ms --> healthy (green)
    15ms <= delay < 25 --> warning (yellow)
    delay > 25ms --? problem (red)

  8. johnstcn commented on Nov 10, 2023

    @johnstcn
    Member

    @johnstcn I think we should instead do it as three health levels. delay < 15 ms --> healthy (green) 15ms <= delay < 25 --> warning (yellow) delay > 25ms --? problem (red)

    Covered by #9754

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions