Repository navigation
perf: large session history blocks Gateway after restart - #117108
Merged
Merged
Conversation
Contributor
Author
|
Maintainer decision: approve after current checks. The exact-head CI gate and Blacksmith changed gate are green at |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where Gateway restart could report ready and then become unresponsive for many minutes while optional session-catalog prewarming synchronously projected a large session store. On the Hetzner recovery host, two consecutive exact-main starts timed out
/healthzand RPC while the Gateway consumed a full CPU core for more than eight minutes.Why This Change Was Made
The earlier sidebar session-list prewarm already materializes each configured agent store. The startup sequence now carries those counts forward and skips only optional catalog prewarming when the combined store exceeds 2,000 entries or when a session-store prewarm failed. Request-time catalog loading remains authoritative, so no catalog capability is disabled.
User Impact
Gateways with unusually large session histories remain responsive after restart instead of blocking health checks and update verification behind cold catalog work. Normal-size stores retain the existing warm-cache behavior.
Evidence
/healthz, deep RPC, and verbose health timed out whilepost-ready.gateway-data.session-catalog.mainheld roughly one CPU core for more than eight minutes.tbx_01kyx7zh36v81sq0a9f78gzs36: 6/6 focused startup and session-catalog prewarm tests passed. The regression materializes a 2,001-entry store and requires session-list/plugin prewarming to continue while catalog prewarming is skipped.