Keep warm wasm workers alive

This commit is contained in:
udo
2026-07-13 08:59:11 +00:00
parent f7e9c5a4ec
commit fe88d4143e
3 changed files with 30 additions and 3 deletions
+4
View File
@@ -1352,6 +1352,10 @@ void listen_for_connections()
// Workers are uniform FastCGI/CLI renderers; the WS broker owns the HTTP/WS
// port and every connection, so workers never accept raw HTTP themselves.
server.close_http_listeners();
// The transport's legacy eight-connection recycle predates persistent
// Wasmtime engines. Recycling makes every ninth request pay engine/module
// startup; request-scoped workspaces already isolate and release user state.
server.calls_until_termination = -1;
server.on_request = &handle_request;
server.on_data = &handle_data;
server.on_complete = &handle_complete;