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

Liveness probe prematurely kills Plausible #11

Closed
reknih opened this issue Apr 30, 2024 · 1 comment
Closed

Liveness probe prematurely kills Plausible #11

reknih opened this issue Apr 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@reknih
Copy link
Contributor

reknih commented Apr 30, 2024

Describe the bug

When first starting Plausible from the chart, the liveness probe reliably kills the plausible-analytics deployment before it has a chance to complete its initial migrations and become ready.

Version of Helm, Kubernetes and the plausible-analytics chart:

$ kubectl version  
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.5

$ helm version
version.BuildInfo{Version:"v3.13.2", GitCommit:"2a2fb3b98829f1e0be6fb18af2f6599e0f4e8243", GitTreeState:"clean", GoVersion:"go1.21.4"}

I used version 0.2.4 of the plausible-analytics chart

What happened:

Kubernetes kills Plausible when the logs reach this state:

Loading plausible..
Starting dependencies..
Starting repos..
create Plausible.Repo database if it doesn't exist
create Plausible.IngestRepo database if it doesn't exist
Creation of Db successful!
+ /entrypoint.sh db migrate
Loading plausible..
Starting dependencies..
Starting repos..
Running migrations for Elixir.Plausible.Repo

What you expected to happen:

A startup probe or a configurable initialDelaySeconds on the liveness probe allow the pod to take extra time to start up. Ideally, I can configure the probes in the values file.

How to reproduce it (as minimally and precisely as possible):

Have a slow server and start with an empty database. I pull the Maxmind GeoIP database and limit to 100m CPU, that may help reproducing this.

alexnuttinck added a commit that referenced this issue Jun 14, 2024
commit 15fe0dc
Author: anuttinck <[email protected]>
Date:   Fri Jun 14 15:48:31 2024 +0200

    [MOD] default initialDelaySeconds for livenessProbe and readnessProbe

commit cedd97b
Author: anuttinck <[email protected]>
Date:   Fri Jun 14 15:28:57 2024 +0200

    [DEL] random totpVaultKey

commit c7e1002
Author: anuttinck <[email protected]>
Date:   Fri Jun 14 13:50:12 2024 +0200

    [ADD] livenessProbe and readinessProbe in values.yaml #11

commit 426df0d
Merge: a246bbc 28c8b0d
Author: anuttinck <[email protected]>
Date:   Fri Jun 14 13:17:46 2024 +0200

    Merge branch 'main' of https://github.com/FyraLabs/helm-plausible-analytics into v0.3.0

commit a246bbc
Author: Maxime VALETTE <[email protected]>
Date:   Fri Jun 14 13:06:33 2024 +0200

    Remove deprecated db init-admin command (#15)

    * Remove deprecated db init-admin command

    https://github.com/plausible/analytics/blob/e522a2d7c182f5a0c7b2d95bf3ea248567a529e0/rel/overlays/init-admin.sh#L4-L5

    * Chart version bump

    Signed-off-by: Maxime VALETTE <[email protected]>

    ---------

    Signed-off-by: Maxime VALETTE <[email protected]>
    Co-authored-by: Alexandre Nuttinck <[email protected]>

commit 5db542b
Author: Bing Steup <[email protected]>
Date:   Fri Jun 14 12:33:00 2024 +0200

    Feat: apply nodeSelector, affinity and tolerations from values.yaml in deployment.yaml and bump version. Signed-off-by: Bing Steup <[email protected]> (#14)

    Co-authored-by: Alexandre Nuttinck <[email protected]>

commit 198536f
Author: anuttinck <[email protected]>
Date:   Fri Jun 14 12:27:17 2024 +0200

    [FIX] MAILGUN_API_KEY in secrets.yaml

commit 4dcebce
Author: Martin Haug <[email protected]>
Date:   Fri Jun 14 12:23:43 2024 +0200

    Fix SendGrid API key secret (#13)

    Signed-off-by: Martin Haug <[email protected]>

commit 13eb40c
Author: anuttinck <[email protected]>
Date:   Fri Jun 14 12:19:31 2024 +0200

    Bump helm chart to 0.3.0

commit 28c8b0d
Author: [email protected] <[email protected]>
Date:   Fri May 31 14:30:58 2024 -0700

    chore: bump version to 0.2.5

    Signed-off-by: [email protected] <[email protected]>

commit 577df6d
Author: lea <[email protected]>
Date:   Fri May 31 14:15:26 2024 -0700

    fix: add newly required totpSecretKey option

commit cf8e41b
Author: lea <[email protected]>
Date:   Fri May 31 14:08:54 2024 -0700

    chore: upgrade for Plausible v2.1.0
@alexnuttinck alexnuttinck self-assigned this Jun 14, 2024
@alexnuttinck alexnuttinck added the bug Something isn't working label Jun 14, 2024
@alexnuttinck
Copy link
Member

@reknih you can now define the livenessProbe and readinessProbe in the values.yaml. Does it work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants