Repository navigation
Fix Durable Object Loader capacity exhaustion and idle ownership - #149
Merged
Merged
Conversation
This was referenced Oct 8, 2026
Closed
This was referenced Oct 15, 2026
cursor Bot
pushed a commit
to charlzyx/open-compute
that referenced
this pull request
Oct 15, 2026
workerd keeps about 64 named isolates per WorkerLoader namespace and does not evict one that still has a request in flight. Closed issue elliothux#146 and merged PR elliothux#149 move Durable Object class loads to unnamed get(null). Ordinary Worker dispatch, service bindings, workflows, and validation still use a named get, so a mixed burst still overflows that cache. All of those loads now share tenant/0. getPrivate is called on the current request because the channel is bound to that IoContext. The factory still returns the same namespace. At most 48 named loads run at once, leaving room under the 64-entry cap for an idle isolate to be evicted. A capacity error that still escapes is HTTP 429. Co-authored-by: ChaoGPT <[email protected]>
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.
Fixes #146.
Durable Object activations previously occupied the shared 64-entry named WorkerLoader cache, which also serves ordinary Worker dispatch and version validation. Load DO classes outside that cache and reuse them only within their owning DoHost activation. Replace the retained self actor stub with a private manager that resolves the host ID for each call, allowing native idle eviction without changing SQLite data or the workerd pin.
Preserve mixed RPC/fetch/CONNECT handler start order and overlapping requests through admission acknowledgements. Fetch and WebSockets keep native HTTP delivery; retained RPC callbacks are duplicated and released on use, cancellation, or expiry.
Validation:
Real Cloudflare differential and Linux release qualification were not run. The regression size is not a new object quota or an unlimited-capacity claim.