mirror of
https://github.com/open-webui/terminals.git
synced 2026-11-05 01:37:21 +00:00
[GH-ISSUE #45] Idle reaper ignores policy idle_timeout_minutes for containers adopted via reconcile() #19
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/terminals#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Classic298 on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/open-webui/terminals/issues/45
After an orchestrator restart, re-adopted containers are never idle-reaped, regardless of policy. They leak until the Docker bridge hits its 1024-port cap (… failed: exchange full) and provisioning breaks.
Cause: the reaper reads the per-container spec from _specs and falls back to settings.idle_timeout_minutes (default 0 = disabled) when the key is missing:
ensure_terminal sets _specs[key] at provision time, but reconcile() (docker.py) rebuilds _instances/_activity and never sets _specs[key] — so adopted containers resolve to the 0 fallback and are skipped forever.
Repro: policy with idle_timeout_minutes: 180, TERMINALS_IDLE_TIMEOUT_MINUTES unset → provision containers → restart orchestrator → they never reap. GET /api/v1/terminals reports idle_timeout_minutes: 0 for them despite the policy.
Fix: populate _specs[key] in reconcile() from the policy (available via the openwebui.com/policy label):
Also: reconcile() seeds _activity to "now" instead of the persisted terminal_last_active_at, resetting the idle clock on every restart — consider fixing alongside.
Workaround: set TERMINALS_IDLE_TIMEOUT_MINUTES=180 so the fallback is non-zero.
@owui-terminator[bot] commented on GitHub (Jul 20, 2026):
⚠️ Missing Issue Title Prefix
@Classic298, your issue title is missing a categorising prefix (e.g.
bug:,feat:,docs:).Please update the title to lead with one of:
Example:
bug: Login fails when the password contains special characters@owui-terminator[bot] commented on GitHub (Jul 20, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
This issue is about lifecycle policy not triggering for containers that remain running, which overlaps with the reported idle-reaping/policy enforcement problem. It’s not the same restart/adoption bug, but it is the closest related policy-trigger behavior.
by Classic298
💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.