#12220·temporal

Evict idle GroupByScheduler groups to reduce retained memory

Author: Kkartik14Created Sep 24, 2026Updated Sep 24, 2026

Expected Behavior

Idle groups should be stopped and removed after a configurable timeout. Groups with running or queued work must remain active, and stale timers must not remove groups that have been reused.

Actual Behavior

GroupByScheduler retains one scheduler per group key for the lifetime of the process. High-cardinality outbound traffic can therefore retain idle groups and their resources after traffic stops.

Steps to Reproduce the Problem

  1. Submit tasks using many unique group keys.
  2. Stop submitting tasks for those keys.
  3. Observe that the group schedulers remain retained indefinitely.

Specifications

  • Version: main
  • Platform: Server-side behavior