microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.11k stars 28.04k forks source link

JS/TS language service crashed 5 times in the last 5 minutes #212359

Open jonthemiller opened 1 month ago

jonthemiller commented 1 month ago

Type: Bug

Open VSCode, open TS file. Wait for Intellisense status to load. Get notification of server crashing 5 times in the last 5 minutes.

I have disabled all extensions. I have reinstalled VS Code fresh. I have switched between TS versions from built in version from VS Code, to lib version in repo.

VS Code version: Code 1.89.0 (Universal) (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:10:10.196Z) OS version: Darwin arm64 23.2.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|17, 16, 10| |Memory (System)|32.00GB (2.58GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions: none
jonthemiller commented 1 month ago

I don't get this issue with a fresh copy of my repo. The repo is a monorepo with multiple TS projects in it, each with their own dependencies, etc. In a freshly checked out copy, I've only installed dependencies for 1 of the projects.

Is there a limit for number of files the TS Server can be aware of? Are there recommendations for managing a monorepo beyond having a proper .code-workspace file?

Edit: increasing the memory allocated to TS Server in settings does help. Setting is Typescript > Tsserver: Max TS Server Memory