Grafana: startup probe so a slow first start is not killed
Grafana's first start creates and migrates its database: 44 s at 0.5 CPU and 3 minutes at 0.1 CPU (measured with 13.2.3 on an empty volume). With only 50m requested, the liveness probe (30 s delay, 3 x 30 s) restarted it mid-migration, in a loop, and readiness never passed. - startupProbe on /api/health allows up to 10 minutes; liveness and readiness start only after it succeeds. - 5 s timeouts on all probes instead of the 1 s default. - Requests raised to 250m CPU / 256Mi (measured about 240 MB in use); still no CPU limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
+16
-3
@@ -85,21 +85,34 @@ spec:
|
||||
mountPath: /etc/grafana/provisioning/dashboards
|
||||
- name: dashboards
|
||||
mountPath: /var/lib/grafana/dashboards/mg4
|
||||
# The first start creates and migrates Grafana's database: measured 44 s at 0.5 CPU
|
||||
# and 3 minutes at 0.1 CPU. The startup probe allows up to 10 minutes for that, and
|
||||
# liveness/readiness only begin once it succeeded, so a slow first start is never
|
||||
# killed mid-migration (which would restart it slowly again, in a loop).
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 60
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
|
||||
Reference in New Issue
Block a user