Skip to content

Add --post-return-timeout to wasmtime serve - #14880

Open
ChihweiLHBird wants to merge 1 commit into
bytecodealliance:mainfrom
ChihweiLHBird:zhiwei/post-return-timeout
Open

ChihweiLHBird wants to merge 1 commit into
bytecodealliance:mainfrom
ChihweiLHBird:zhiwei/post-return-timeout

Conversation

@ChihweiLHBird

Copy link
Copy Markdown

-W timeout also bounded how long a WASIp3 component instance may keep running after all of its requests have produced responses, for example while it is still streaming a response body, so a short request timeout cut off long-lived streams. Add --post-return-timeout to bound that phase on its own. It defaults to -W timeout, so behavior is unchanged unless it is set.

Like -W timeout, setting the option runs blocking WASI filesystem calls on background threads and enables epoch interruption, so the deadline is enforced while the guest is blocked in a filesystem call or never yields. RunCommon::configure_wasip2 now takes the blocking decision as a parameter, since run and serve derive it differently.

@ChihweiLHBird
ChihweiLHBird force-pushed the zhiwei/post-return-timeout branch 3 times, most recently from 2f56de4 to d7591b9 Compare October 24, 2026 06:52
`-W timeout` also bounded how long a WASIp3 component instance may keep
running after all of its requests have produced responses, for example
while it is still streaming a response body, so a short request timeout
cut off long-lived streams. Add `--post-return-timeout` to bound that
phase on its own. It defaults to `-W timeout`, so behavior is unchanged
unless it is set.

Like `-W timeout`, setting the option runs blocking WASI filesystem
calls on background threads and enables epoch interruption, so the
deadline is enforced while the guest is blocked in a filesystem call or
never yields. `RunCommon::configure_wasip2` now takes the blocking
decision as a parameter, since `run` and `serve` derive it differently.
@ChihweiLHBird
ChihweiLHBird force-pushed the zhiwei/post-return-timeout branch from d7591b9 to 73d76cf Compare October 24, 2026 07:01
@ChihweiLHBird
ChihweiLHBird marked this pull request as ready for review October 24, 2026 07:40
@ChihweiLHBird
ChihweiLHBird requested a review from a team as a code owner October 24, 2026 07:40
@ChihweiLHBird
ChihweiLHBird requested review from dicej and removed request for a team October 24, 2026 07:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant