We’re seeing multi-GB RAM in both Temporal Server (History service) and Postgres, even though we:
- Run only a handful of workflows per user; each runs every minute and continue-as-new to keep histories short.
- Slashed cache sizes and retention:
history.cacheInitialSize: 8 # default 128
history.cacheMaxSize: 16 # default 512
history.eventsCacheInitialSize: 8 # default 128
history.eventsCacheMaxSize: 16 # default 512
dataRetention: 1h # was 1D
What we observe
- RAM rises until it hits the retention window, then plateaus—but still far too high.
- LRU cache keeps completed/continued-as-new workflow histories in memory until another running workflow evicts them.
- Community threads call this a “memory leak”; wasted RAM looks like 50-95 % of total.
Has anyone found a workaround or settings that truly flush unused cache or reduce memory usage? All insight welcome—thanks!