microsoft / vscode

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

TypeScript language service stop often #145419

Closed samir-jorge-araujo closed 2 years ago

samir-jorge-araujo commented 2 years ago

Issue Type: Bug

  1. Open an .tsx file with some valid content inside it
  2. Leave the window open for about an hour or more
  3. VSCode TypeScript language service will die and likely it will display a warning saying "The TypeScript language service died unexpectedly 5 times in the last 5 minutes."

The only way I can make it run again is by restarting the whole extension host

VS Code version: Code - Insiders 1.66.0-insider (d572d6e9d1282b352227916cb8f95bb2b03ddcaa, 2022-03-18T05:16:00.977Z) OS version: Darwin x64 21.3.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz (4 x 3500)| |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
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|7, 7, 5| |Memory (System)|8.00GB (0.02GB free)| |Process Argv|--crash-reporter-id a83c7942-0b05-4a44-b816-593a1af9bd42| |Screen Reader|no| |VM|0%|
Extensions (55) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.1.0 vscode-sql-formatter|adp|1.4.4 vscode-nginx-conf|ahm|0.1.3 project-manager|ale|12.5.0 sort-imports|ama|6.3.1 laravel-extra-intellisense|ami|0.6.2 jest-snippets|and|1.8.0 vscode-intelephense-client|bme|1.8.2 turbo-console-log|Cha|2.1.7 better-jest|Coa|1.0.0 laravel-goto-view|cod|1.3.7 hex-to-rgba|dak|1.0.0 mussumipsum|Dav|1.0.0 vscode-eslint|dba|2.2.2 vscode-faker|dee|2.0.0 vscode-new-file|dku|4.0.2 gitlens|eam|12.0.5 vsc-material-theme|Equ|33.4.0 vsc-material-theme-icons|equ|2.2.1 prettier-vscode|esb|9.3.0 codespaces|Git|1.5.7 vscode-graphql|Gra|0.3.52 output-colorizer|IBM|0.1.2 nginx-log-highlighter|jak|1.1.0 react-jest-vscode-snippets|jal|0.0.3 lorem-whatever|job|1.0.2 svg|joc|1.4.17 vscode-peacock|joh|4.0.1 vscode-random|jre|1.11.0 php-cs-fixer|jun|0.2.10 php-add-property|kot|1.1.0 better-pest|m1g|0.1.0 php-namespace-resolver|Meh|1.1.8 dotenv|mik|1.0.1 sublime-keybindings|ms-|4.0.10 vscode-typescript-tslint-plugin|ms-|1.3.3 color-highlight|nau|2.5.0 php-docblocker|nei|2.7.0 laravel-blade|one|1.32.0 laravel5-snippets|one|1.15.0 material-icon-theme|PKi|4.14.1 typescript-hero|rbb|3.0.0 vscode-xml|red|0.19.1 vscode-yaml|red|1.5.1 synthwave-vscode|Rob|0.1.11 px-to-rem|sai|1.3.1 vscode-blade-formatter|shu|0.13.10 gitconfig|sid|2.0.1 mdx|sil|0.1.0 indenticator|Sir|0.7.0 vscode-fileutils|sle|3.5.0 code-spell-checker|str|2.1.7 vscode-icons|vsc|11.10.0 markdown-all-in-one|yzh|3.4.0 material-theme|zhu|3.13.20 (6 theme extensions excluded)
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392:30422396 pythontb:30258533 vsc_aacf:30263846 pythonvspyt551:30291412 pythonptprofiler:30281269 vsdfh931:30280409 vshan820:30294714 pythondataviewer:30285072 vscod805cf:30301675 pythonvspyt200:30323110 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30404738 wslgetstarted:30449409 vsclayoutctrt:30405800 dsvsc009:30440021 pythonvspyt640:30438691 vscscmwlcmc:30428972 vscgsvid2:30433758 dockersurvey3cf:30438169 pynewfile477:30451556 ```

Thisi is a screenshot of the warning that keeps popping up when this happens: Screen Shot 2022-03-18 at 16 41 41

samir-jorge-araujo commented 2 years ago

Upon further inspection (and months trying to figure out the reason) I found out through Activity Monitor that Docker was eating away my memory (also my fault) and subsequently stopping TypeScript service.

I will leave this issue closed to help others in the future with the same problem.