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

devtools/vscode debugging still fails with Message is too large (>1MB) #2051

Open
erkkah opened this issue Apr 24, 2024 · 3 comments
Open

devtools/vscode debugging still fails with Message is too large (>1MB) #2051

erkkah opened this issue Apr 24, 2024 · 3 comments

Comments

@erkkah
Copy link

erkkah commented Apr 24, 2024

As mentioned in #1563, this still happens for large devtools messages that are passed between workerd instances.
Since these messages get read here:

auto message = co_await ws.receive();

They are also limited by the default 1M limit.

As an experiment (main...erkkah:workerd:fix/hanging-debugsession) I increased the limit, which made the problem go away.

However, the limit should probable only be changed for the debugging case, and I don't know the code enough to suggest a solution.

In my setup, I hit this limit as soon as a breakpoint hits. I use 15 durable object namespaces. If I reduce the number of loaded namespaces, the problem goes away.

@penalosa
Copy link
Collaborator

penalosa commented Apr 24, 2024

cc @irvinebroque @markdembo this seems related to the recent email discussion

@kentonv
Copy link
Member

kentonv commented Apr 24, 2024

Hmm, this suggests that the devtools WebSocket connection is being proxied through a worker. Wrangler normally creates a hidden proxy worker around the application itself, but is it also proxying devtools inspector connections? It seems like this shouldn't be needed -- can wrangler connect directly to the inspector port instead?

@kyle-pena-nlp
Copy link

kyle-pena-nlp commented May 5, 2024

I am also seeing this behavior persisting after the merged fix. Would be great if team could fix sooner rather than later, I have downgraded wrangler (which depends on workerd) to 3.18.0 as a workaround. Steps to replicate for me are to have a codebase in excess of roughly 10,600 lines (obviously that will vary for you), set a breakpoint, attach debugger, hit breakpoint.

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

No branches or pull requests

4 participants