Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

fix(server): add timeouts to persistent isolate to prevent dev server hangs#75

Merged
viniciusdacal merged 1 commit into
mainfrom
viniciusdacal/fix-dev-stuck
Apr 1, 2026
Merged

fix(server): add timeouts to persistent isolate to prevent dev server hangs#75
viniciusdacal merged 1 commit into
mainfrom
viniciusdacal/fix-dev-stuck

Conversation

@viniciusdacal
Copy link
Copy Markdown
Contributor

Summary

  • Adds 30s request-level timeouts on handle_request and handle_ssr to prevent HTTP handlers from hanging indefinitely when the V8 event loop is stuck
  • Adds 25s V8 event loop timeouts in dispatch_api_request and dispatch_ssr_request so the isolate thread recovers before the caller gives up
  • Adds 30s init timeouts during module loading (SSR module capture, server module capture) so startup doesn't block forever on stuck JS

Previously, any unresolved promise or stuck async operation in user JS code would make the entire dev server unresponsive and unkillable.

🤖 Generated with Claude Code

… hangs

V8 event loop calls (run_event_loop) could block forever if JS code had
unresolved promises or stuck async operations, making the entire dev server
unresponsive and unkillable. Add 30s request-level timeouts on handle_request
and handle_ssr, 25s V8 event loop timeouts in dispatch functions, and 30s
init timeouts during module loading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@viniciusdacal viniciusdacal merged commit f823fa6 into main Apr 1, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant