Root cause of intermittent DNS up/down alerts: Pi-hole's default
rate-limit (1000 queries/60s per client) was throttling Uptime Kuma
on the Cloudron VPS (tsys-cloudron, 100.107.35.78). Uptime Kuma sends
high-volume DNS queries to monitor dozens of hosts; when it exceeded
the limit, Pi-hole responded REFUSED, which Uptime Kuma detected as
DNS being down. This happened every 1-2 minutes.
Evidence: 40 rate-limiting events against 100.107.35.78 in recent
netinfra-01 Pi-hole logs. Also 10.53.0.1 (Docker bridge gateway) hit
4852 queries in a single 60s window.
Fix: Set dns.rateLimit.count=0 and dns.rateLimit.interval=0 on both
nodes (private tailnet, no DNS amplification risk). Also persisted in
docker-compose.yml via FTLCONF env vars.
Combined with prior IPv6 fix (4f82520), this resolves all known causes
of DNS flapping.
[#376]
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
services:
|
|
pihole:
|
|
container_name: pihole
|
|
# Root cause of the 2026-08 gravity.db corruption: default /dev/shm (64M)
|
|
# was too small for FTL's shared-memory metrics. 1024M has been stable.
|
|
shm_size: '1024M'
|
|
image: pihole/pihole:latest
|
|
hostname: pihole
|
|
entrypoint: ["/usr/local/bin/gravity-validate.sh"]
|
|
ports:
|
|
- "53:53/tcp"
|
|
- "53:53/udp"
|
|
- "10002:80/tcp"
|
|
- "10003:443/tcp"
|
|
environment:
|
|
TZ: 'America/Chicago'
|
|
FTLCONF_webserver_api_password: '${PIHOLE_WEB_PASSWORD}'
|
|
FTLCONF_dns_listeningMode: 'all'
|
|
# Rate-limiting disabled (count=0). Uptime Kuma on Cloudron VPS sends
|
|
# high-volume DNS queries for monitoring; default 1000/60s limit was
|
|
# causing intermittent REFUSED responses → Uptime Kuma flapping.
|
|
FTLCONF_dns_rateLimit_count: '0'
|
|
FTLCONF_dns_rateLimit_interval: '0'
|
|
FTLCONF_dns_upstreams: '["8.8.8.8"]'
|
|
volumes:
|
|
- './etc-pihole:/etc/pihole'
|
|
- './etc-dnsmasq.d:/etc/dnsmasq.d'
|
|
- './gravity-validate.sh:/usr/local/bin/gravity-validate.sh:ro'
|
|
cap_add:
|
|
- SYS_NICE
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "dig +short +norecurse @127.0.0.1 pi.hole >/dev/null 2>&1 && test -s /etc/pihole/gravity.db || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
labels:
|
|
autoheal: "true"
|
|
networks:
|
|
- default
|
|
- dnsnet
|
|
autoheal:
|
|
container_name: autoheal
|
|
image: willfarrell/autoheal:latest
|
|
environment:
|
|
AUTOHEAL_CONTAINER_LABEL: autoheal
|
|
AUTOHEAL_INTERVAL: 30
|
|
AUTOHEAL_START_PERIOD: 60
|
|
volumes:
|
|
- '/var/run/docker.sock:/var/run/docker.sock:ro'
|
|
restart: always
|
|
networks:
|
|
dnsnet:
|
|
external: true
|