You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NodeHttpServer disposal can remain pending indefinitely when a client aborts a request whose handler is waiting on an upstream FetchHttpClient request. The configured gracefulShutdownTimeout does not bound disposal in this case.
An upstream Node server that accepts a HEAD request but intentionally leaves its response pending.
An Effect NodeHttpServer whose HEAD / handler awaits HttpClient.head to that upstream.
A downstream Node client that aborts after the upstream request starts.
runtime.dispose() with gracefulShutdownTimeout: "100 millis".
Expected
The aborted request handler is interrupted and runtime.dispose() completes, bounded by the configured graceful shutdown timeout.
Actual
The request handler fiber remains in the server's handler scope and runtime.dispose() does not complete. The reproduction fails after two seconds:
Error: FAIL: runtime.dispose exceeded 2 seconds
Temporary instrumentation showed that the server's preemptive shutdown finalizer completes, but the handler child scope retains the aborted HEAD / fiber, preventing the outer server scope finalizer from running. The current response-close guard only interrupts when nodeResponse.writableEnded is false; in this case the close observed during disposal has writableEnded === true while the handler fiber is still pending.
Versions
effect: 4.0.0-beta.99
@effect/platform-node: 4.0.0-beta.99
Node.js: 24.15.0
Linux x86_64
The same standalone reproduction fails against current Effect main at ce95d88603e9facbcd6c462c5444e391792dde6b.
Activity