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

Setting extension heap size doesn't seem to affect anything #467

Closed
maxhillaert opened this issue Feb 21, 2019 · 4 comments
Closed

Setting extension heap size doesn't seem to affect anything #467

maxhillaert opened this issue Feb 21, 2019 · 4 comments
Assignees
Labels
help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@maxhillaert
Copy link

  • VSCode Version: 1.29.1
  • OS Version: Windows 7

Steps to Reproduce:

I'm developing inhouse language service extension. The server process seems to be limited to heapsize of around 2000mb

I'm trying to override this in various ways:

`let serverOptions: ServerOptions = {
run: {
module: serverModule, transport: TransportKind.ipc,
args: ["--max_old_space_size=8096"],
options: {
execArgv: ["--max_old_space_size=8096"],
env: {
"NODE_OPTIONS": "--max_old_space_size=8096"
}
}
},
debug: {
module: serverModule,
transport: TransportKind.ipc,
options: {
execArgv: ['--nolazy', '--inspect=6009', '--max_old_space_size=8096'],
env: {
"NODE_OPTIONS": "--max_old_space_size=8096"
}
},
args: ["--max_old_space_size=8096"]
}
};

None of these seem to have an effect. The server process is stuck at 2000 mb until it bombs out.

Does this issue occur when all extensions are disabled?: Yes/No

@weinand weinand removed their assignment Feb 21, 2019
@sandy081 sandy081 assigned dbaeumer and unassigned sandy081 Feb 21, 2019
@dbaeumer dbaeumer transferred this issue from microsoft/vscode Feb 22, 2019
@dbaeumer
Copy link
Member

@maxhillaert you can always pass in a server function to start the node server by itself. This gives you full control over how to start the server.

This could also be an issue with the fact that we start Electron as RUN_AS_NODE instead of a pure node. You can also use the runtime property to point to a pure node runtime.

@dbaeumer dbaeumer added feature request help wanted Issues identified as good community contribution opportunities labels Feb 22, 2019
@maxhillaert
Copy link
Author

maxhillaert commented Feb 22, 2019 via email

@bradleyayers
Copy link

@maxhillaert how'd you go with this, did you find a way to increase the memory for the server?

@dbaeumer
Copy link
Member

dbaeumer commented Oct 6, 2020

I tested this today and I was able to successfully pass the --max_old_space_size to my server. On the server side I did:

const arr = new Array(1073741824);
for (let i = 0; i < 1073741824; i++) {
	arr[i] = new String('#'.repeat(4));
}

and referencing the array in the validate call.

and the server didn't crash starting it with --max_old_space_size=8096

I will close the issue. Please provide a GitHub repository I can clone that demos what you are seeing if you are still experiencing the problem.

@dbaeumer dbaeumer closed this as completed Oct 6, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

5 participants