Skip to content

Commit

Permalink
fix: raise healthcheck interval for redis, memcached and postgres
Browse files Browse the repository at this point in the history
The 2s interval caused constantly high CPU usage. 30s interval with 3 retries is the Docker default and doesn't hurt the system that much.
Fixes getsentry#1000
  • Loading branch information
wodCZ authored Jun 25, 2021
1 parent 1d49629 commit d808f53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ services:
healthcheck:
# From: https://stackoverflow.com/a/31877626/5155484
test: echo stats | nc 127.0.0.1 11211
interval: 2s
interval: 30s
timeout: 3s
retries: 30
retries: 3
start_period: 3s
redis:
<<: *restart_policy
image: "redis:5.0-alpine"
healthcheck:
test: redis-cli ping
interval: 2s
interval: 30s
timeout: 3s
retries: 30
retries: 3
start_period: 3s
volumes:
- "sentry-redis:/data"
Expand All @@ -87,9 +87,9 @@ services:
healthcheck:
# Using default user "postgres" from sentry/sentry.conf.example.py or value of POSTGRES_USER if provided
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 2s
interval: 30s
timeout: 3s
retries: 30
retries: 3
start_period: 10s
command: ["postgres", "-c", "wal_level=logical", "-c", "max_replication_slots=1", "-c", "max_wal_senders=1"]
environment:
Expand Down

0 comments on commit d808f53

Please sign in to comment.