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(playgrounds): handle out of memory playground worker VSCODE-269 #459

Merged
merged 2 commits into from
Dec 19, 2022

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Dec 14, 2022

VSCODE-269

This pr makes it so that when the playground worker running mongosh runs out of memory we re-initialize the language server so that subsequent playgrounds can be run.
The pr adds a playground to the repository to be used for testing this functionality.

At first I was trying to catch an error the worker thread would throw but it seemed to happen at a higher level

const worker = new WorkerThreads(
I'm thinking the VSCode language server disposes any language servers that encounter an out of memory error and restarts them automatically. It throws a Pending response rejected since connection got disposed error which is what we look for.

Screen Shot 2022-12-14 at 4 03 09 PM

src/editors/playgroundController.ts Outdated Show resolved Hide resolved
@Anemy Anemy merged commit b997af6 into main Dec 19, 2022
@Anemy Anemy deleted the VSCODE-269-handle-out-of-memory branch December 19, 2022 17:27
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

Successfully merging this pull request may close these issues.

2 participants