Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local worker runtime freezing #1819

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Fix local worker runtime freezing #1819

merged 2 commits into from
Mar 5, 2024

Conversation

frandiox
Copy link
Contributor

@frandiox frandiox commented Mar 5, 2024

Closes #1720
Closes #1784

We were not handling workerd log streams properly because we ingest the logs using the inspector protocol instead.
These streams were probably reaching their internal buffer limit and workerd freezes after that.

🎩 To test this, h2 dev in skeleton template, open the home page in the browser and open the Network tab with the console below (ESC). Run the following code in the console without the changes of this PR, then apply these changes and try again:

for (let i = 0; i < 1000; i++) {
  const res = await fetch('http://localhost:3000/search');
  const result = await res.text()
  console.log(i);
}

Without the changes in this PR, it will freeze after ~90 requests.

@frandiox frandiox requested a review from a team March 5, 2024 16:54
@blittle blittle merged commit eedd9c4 into main Mar 5, 2024
10 checks passed
@blittle blittle deleted the fd-fix-local-freeze branch March 5, 2024 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants