Is there a cleanup script running in bw? I had over 3000 reports, and bunkerweb-UI was feeling very sluggish, after a refresh of the bunkerweb-UI page, I have 150 reports left, but old logs/bans are still there (24h bans that expire today) Home dashboard still shows 6.0K blocked requests Unique blocked ips went down from 100+ to 4, Blocking status over time is a 0 line till about an hour ago. This wasn’t before all reports disappeared I’m running bunkerweb through docker, and the docker containers haven’t been restarted since Friday
Hi! Yes, there’s a built-in cleanup mechanism in the metrics plugin.
The function enforce_redis_requests_cap() runs periodically and trims the oldest blocked requests from Redis when the list exceeds METRICS_MAX_BLOCKED_REQUESTS_REDIS (default: 100,000). When old requests are removed, their associated facet data (unique IPs, timeline, etc.) is decremented too — which explains the IP count dropping and the timeline resetting.
Your symptoms explained:
- Reports 3000 → 150: Old requests were trimmed from the Redis list (FIFO)
- Unique IPs 100+ → 4: IPs only present in removed requests got cleaned from facets
- Timeline reset to 0: Timeline is computed from remaining requests only
- Bans still showing: Bans are stored separately with their own TTL — not affected by this cleanup
- 6K blocked still on dashboard: Some counters are tracked independently from the request list
Since your containers haven’t restarted since Friday, the request list likely crossed the cap threshold and got trimmed.
Important: If you don’t have Redis configured, bans and reports are only stored in NGINX worker memory (shared dict / LRU cache). This means they don’t persist across container restarts or NGINX reloads — everything is lost. Redis is required for persistent storage of bans and metrics data. The per-worker memory cap is also much smaller (METRICS_MAX_BLOCKED_REQUESTS defaults to 1,000).
You can check/increase the Redis cap:
METRICS_MAX_BLOCKED_REQUESTS_REDIS=100000 # default