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

pulumi/pulumi-azure-native causes high memory usage #53137

Closed
rhuanbarreto opened this issue Mar 7, 2023 · 7 comments
Closed

pulumi/pulumi-azure-native causes high memory usage #53137

rhuanbarreto opened this issue Mar 7, 2023 · 7 comments
Labels
Duplicate An existing issue was already created

Comments

@rhuanbarreto
Copy link

Type: Bug

I have vs with almost no extensions enabled. Loading a TS file makes the initializing JS/TS language features to try for long time.

I enabled "typescript.tsserver.trace": "verbose" and this is the error:

TSServer exited. Code: null. Signal: SIGABRT

VS Code version: Code 1.76.0 (Universal) (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:23:45.993Z)
OS version: Darwin arm64 22.3.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 5, 10
Memory (System) 64.00GB (45.81GB free)
Process Argv --crash-reporter-id 0fdbad9d-6e2e-4d8d-87d7-fbda52a71475
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
vscccc:30610679
pyindex848:30662994
nodejswelcome1cf:30587006
282f8724:30602487
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
2i9eh265:30646982

@zhangxingsong

This comment was marked as duplicate.

@rhuanbarreto
Copy link
Author

In my case it's an issue about the @pulumi/azure-native package that is huge to index by the TS language plugin.

pulumi/pulumi-azure-native#1997

Best solution was to remove the top level import and change it to importing from the subfolders according to this comment pulumi/pulumi-azure-native#932 (comment)

Increasing the memory for typescript for parsing it can also help but doesn't solve all the time. pulumi/pulumi-azure-native#1997 (comment)

But I really wish VScode could have a timeout option to increase its timeout for those specific cases of big libraries. Today the abort timeout is not configurable.

@mjbvz mjbvz transferred this issue from microsoft/vscode Mar 7, 2023
@mjbvz
Copy link
Contributor

mjbvz commented Mar 7, 2023

Thanks for investigating @rhuanbarreto! I've moved this over to TypeScript to see if there's anything that we can improve on the TS side (in addition to improvements to that package)

It sounds like server is running out of memory here. There's no specific timeouts for analyzing big libraries

@mjbvz mjbvz changed the title TSServer exited. Code: null. Signal: SIGABRT pulumi/pulumi-azure-native causes high memory usage Mar 7, 2023
@mjbvz
Copy link
Contributor

mjbvz commented Mar 7, 2023

Likely a duplicate of #50809 (comment) though (and sounds like the next steps are on pulumi)

@mjbvz mjbvz removed their assignment Mar 7, 2023
@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Mar 7, 2023
@rhuanbarreto
Copy link
Author

@mjbvz how can I profile memory usage from the ts server in vscode? I increased the memory size to 8192 and I have 64GB total but no help. I just want to find a sensible number here.

@mjbvz
Copy link
Contributor

mjbvz commented Mar 7, 2023

Unfortunately 4GB is the max memory at the moment regardless of any setting: microsoft/vscode#175792

@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

5 participants