Sebastian S
11/21/2025, 7:39 PM1) "message: 151465 keys | TTL - min: 0s, max: 300s, avg: 115s (151465/151465 with TTL)"
2) "events: 1 keys | No TTL set"
3) "task-run-recorder: 24137 keys | TTL - min: 0s, max: 1800s, avg: 1006s (24137/24137 with TTL)"
4) "actions: 1 keys | No TTL set"
5) "triggers: 99586 keys | TTL - min: 0s, max: 1800s, avg: 883s (99586/99586 with TTL)"Marvin
11/21/2025, 7:39 PMMarvin
11/21/2025, 7:43 PMMarvin
11/21/2025, 7:43 PMSebastian S
11/21/2025, 7:43 PMMarvin
11/21/2025, 7:45 PMMarvin
11/21/2025, 7:46 PMTYPE events
- TYPE actions
- You should see stream for these; the others will be string, set, or zset depending on the coordination structure.
- Inspect consumer groups:
- XINFO GROUPS events
- XINFO GROUPS actions
- Stream depth and consumers:
- XLEN events
- XINFO CONSUMERS events <group-name>
- Sample coordination keys:
- SCAN 0 MATCH "task-run-recorder:*" COUNT 1000
- SCAN 0 MATCH "triggers:*" COUNT 1000
If you can share whether you’re using the Redis messaging backend and what you see from TYPE events and TYPE actions, I can confirm the exact consumer group layout in your deployment.
References
- Events: Prefect Events
- Automations: Automations overview
- Redis integration code: prefect-redisChu
11/21/2025, 8:10 PMMarvin
11/21/2025, 8:10 PMMarvin
11/21/2025, 8:13 PMPREFECT_REDIS_MESSAGING_CONSUMER_TRIM_EVERY (default 60s) – how often consumers trim
- PREFECT_REDIS_MESSAGING_CONSUMER_TRIM_IDLE_THRESHOLD (default 300s) – excludes fully idle groups from blocking trims
- Keep consumer groups healthy (remove abandoned ones, ensure consumers are running). Idle/stale groups can block trimming; Prefect excludes very idle groups and cleans up empty ephemeral groups automatically.
- If you need to constrain memory, prefer Redis-wide memory policies over per-stream MAXLEN, and monitor stream depth.
How to verify your setup:
TYPE events
XLEN events
XINFO GROUPS events
XINFO CONSUMERS events <group-name>
If your events key isn’t a stream (TYPE != stream), then MAXLEN doesn’t apply; share the TYPE output and I’ll help confirm.
References
- Events concepts: Prefect Events docs
- Automations overview: Automations docs
- Redis integration code: prefect-redis