microsoft / vscode

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

VSCode lags with `net::ERR_NETWORK_IO_SUSPENDED` and `EMFILE: too many open files` errors #188340

Closed Demianeen closed 1 year ago

Demianeen commented 1 year ago

Type: Performance Issue

I am experiencing lags in VSCode and when I checked the logs, I found two separate issues occurring. The first issue is the net::ERR_NETWORK_IO_SUSPENDED error, which can occur when the network connection is lost or suspended. The second issue is the EMFILE: too many open files error, which indicates that there are too many files open simultaneously. This can happen if there are too many file descriptors being used by the system or if the system has reached its limit for the maximum number of open files. Here are the logs for reference:

marketplace.visualstudio.com/_apis/public/gallery/extensionquery:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/src/shared/ui/deprecated/WithLabel/WithLabel.tsx’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/src/entities/Notification/ui/NotificationList/NotificationListDeprecated/NotificationListDeprecated.stories.tsx’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/src/entities/Notification/ui/NotificationList/NotificationListDeprecated/NotificationListDeprecated.tsx’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/vite.config.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/webpack.config.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/refactoring/toCFS.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/removeFeature/index.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/removeFeature/lib/removeToggleFunction.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/removeFeature/lib/removeToggleComponent.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/renameSlice/index.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/renameSlice/generators/index.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/renameSlice/generators/renameFile.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/renameSlice/generators/renameDir.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/refactoring/updateImports.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/renameSlice/types/createSlice.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/updateLayersDocs/createDocsForEachSlice.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/updateLayersDocs/updateLayersDocs.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/createSlice/generators/createApi/createApi.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/createSlice/generators/createApi/templates/rtkApi.template.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/createSlice/generators/createUi/createUi.ts’​ [Extension Host] Error: EMFILE: too many open files, open ‘/Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/scripts/createSlice/generators/createUi/templates/ui.template.tsx’

VS Code version: Code 1.80.1 (Universal) (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:20:23.298Z) OS version: Darwin arm64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|4, 4, 5| |Memory (System)|16.00GB (0.03GB free)| |Process Argv|--crash-reporter-id db2d9547-9ad9-4f2e-8928-db71d9243463| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 18 115 509 code main 10 66 1273 gpu-process 0 16 1279 utility-network-service 19 508 1280 window [1] (~/Desktop/program-learning/ulbitv/react-production/react-production/src/entities/Article/ui/ArticleList/VirtualizedArticleList.tsx) 0 16 1583 ptyHost 0 0 28139 npm run storybook 0 33 28490 node /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/.bin/storybook dev -p 6006 -c ./config/storybook --no-open 0 0 28493 /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.17.19 --ping 0 0 28890 /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/@esbuild/darwin-arm64/bin/esbuild --service=0.17.19 --ping 0 0 31342 /bin/zsh -il 0 0 46160 ssh time4vps 0 33 59613 npm run start 0 33 59967 node /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/.bin/concurrently npm run start:dev:server npm run start:dev:client 0 33 59968 npm run start:dev:server 0 33 60022 node ./json-server/index.js 0 33 59969 npm run start:dev:client 0 49 60020 webpack 0 33 60030 /Users/demian/.nvm/versions/node/v20.2.0/bin/node /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/fork-ts-checker-webpack-plugin/lib/typescript/worker/get-dependencies-worker.js 0 33 60085 /Users/demian/.nvm/versions/node/v20.2.0/bin/node --max-old-space-size=2048 /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/fork-ts-checker-webpack-plugin/lib/typescript/worker/get-issues-worker.js 39 98 1584 shared-process 0 0 65401 /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 2 754 26682 extensionHost [1] 0 0 26727 electron-nodejs (reporter.js ) 0 16 26951 node /Users/demian/Desktop/program-learning/ulbitv/react-production/react-production/node_modules/.bin/jest --config ./config/jest/jest.config.ts --testLocationInResults --json --useStderr --outputFile /var/folders/1b/wrjh6hrn5zqgnrsh2nv8kh380000gn/T/jest_runner_react_production_501.json --watch --no-coverage --reporters default --reporters /Users/demian/.vscode/extensions/orta.vscode-jest-5.2.3/out/reporter.js --colors 0 16 27035 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/mongodb.mongodb-vscode-1.1.0/dist/languageServer.js --node-ipc --clientProcessId=26682) 0 16 27105 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/redhat.fabric8-analytics-0.3.10/dist/server.js --node-ipc --clientProcessId=26682) 0 16 27399 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/github.vscode-github-actions-0.25.8/dist/server-node.js --node-ipc --clientProcessId=26682) 0 16 27593 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/streetsidesoftware.code-spell-checker-2.20.5/packages/_server/dist/main.js --node-ipc --clientProcessId=26682) 0 16 27594 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/stylelint.vscode-stylelint-1.2.4/dist/start-server.js --stdio --clientProcessId=26682) 0 16 28075 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=26682) 0 16 34048 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /var/folders/1b/wrjh6hrn5zqgnrsh2nv8kh380000gn/T/vscode-typescript501/5a82a6c9b09f5e52e08d/tscancellation-6edb79a684bb007574d8.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin,ms-vsintellicode-typescript --pluginProbeLocations /Users/demian/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.30,/Users/demian/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.30 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc) 0 16 34049 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node --max-old-space-size=3072 /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/1b/wrjh6hrn5zqgnrsh2nv8kh380000gn/T/vscode-typescript501/5a82a6c9b09f5e52e08d/tscancellation-7fb4b965b5c0f4991172.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin,ms-vsintellicode-typescript --pluginProbeLocations /Users/demian/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.30,/Users/demian/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.30 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc) 0 16 34053 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /Users/demian/.cache/typescript/5.1 --enableTelemetry --typesMapLocation /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation) 0 16 34050 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/dbaeumer.vscode-eslint-2.4.2/server/out/eslintServer.js --node-ipc --clientProcessId=26682) 0 16 34055 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/visualstudioexptteam.intellicode-api-usage-examples-0.2.7/dist/server/server.js --node-ipc --clientProcessId=26682) 0 16 45959 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/html-language-features/server/dist/node/htmlServerMain --node-ipc --clientProcessId=26682) 0 16 81966 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/css-language-features/server/dist/node/cssServerMain --node-ipc --clientProcessId=26682) 0 16 81967 electron-nodejs (/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/demian/.vscode/extensions/mrmlnc.vscode-scss-0.10.0/out/unsafe/server.js --node-ipc --clientProcessId=26682) 0 33 26683 fileWatcher [1] 0 66 52304 window 0 66 52305 window 0 66 52306 window 0 66 52307 window 30 98 65399 window [9] (Issue Reporter) ```
Workspace Info ``` | Window (~/Desktop/program-learning/ulbitv/react-production/react-production/src/entities/Article/ui/ArticleList/VirtualizedArticleList.tsx) | Folder (react-production): 7128 files | File types: png(5290) ts(446) tsx(370) scss(91) js(62) json(56) md(39) | svg(36) html(25) xml(24) | Conf files: github-actions(3) settings.json(3) tsconfig.json(2) | launch.json(1) package.json(1) project.json(1) | Launch Configs: chrome(2); ```
Extensions (81) Extension|Author (truncated)|Version ---|---|--- codesnap|adp|1.3.4 vscode-nginx-conf|ahm|0.1.3 project-manager|ale|12.7.0 vscode-tldr|bmu|1.0.0 vscode-chrome-extesion-manifest-json-schema|cez|1.0.2 regex|chr|0.4.0 vscode-css-modules|cli|0.5.1 vscode-devtools-for-chrome|cod|0.0.7 gitignore|cod|0.9.0 doxdocgen|csc|1.4.0 vscode-markdownlint|Dav|0.51.0 vscode-eslint|dba|2.4.2 python-environment-manager|don|1.0.4 python-extension-pack|don|1.7.0 xml|Dot|2.5.1 es7-react-js-snippets|dsz|4.4.3 gitlens|eam|14.1.1 vscode-html-css|ecm|1.13.1 RunOnSave|eme|0.2.0 prettier-vscode|esb|9.19.0 code-runner|for|0.12.0 html-slim-scss-css-class-completion|gen|1.7.8 codespaces|Git|1.14.12 copilot|Git|1.97.270 copilot-chat|Git|0.5.2023071302 copilot-labs|Git|0.14.884 vscode-github-actions|git|0.25.8 vscode-pull-request-github|Git|0.68.1 todo-tree|Gru|0.0.226 vscode-fast-folder-structure|Huu|3.10.0 vscode-env|Iro|0.1.0 search-node-modules|jas|1.3.0 webpack|jer|3.0.2 vsc-python-indent|Kev|1.18.0 node-module-intellisense|lei|1.5.0 i18n-ally|lok|2.10.0 markdown-shortcuts|mdi|0.12.0 dotenv|mik|1.0.1 mongodb-vscode|mon|1.1.0 vscode-scss|mrm|0.10.0 isort|ms-|2023.10.1 pylint|ms-|2023.6.0 python|ms-|2023.12.0 vscode-pylance|ms-|2023.7.20 jupyter|ms-|2023.6.1101941928 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.301.0 remote-ssh|ms-|0.102.0 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.80.2 vscode-remote-extensionpack|ms-|0.24.0 js-debug-nightly|ms-|2023.7.1717 remote-explorer|ms-|0.4.1 remote-server|ms-|1.3.0 vscode-jest|Ort|5.2.3 vscode-versionlens|pfl|1.5.0 material-icon-theme|PKi|4.29.0 nginx-formatter|ray|0.0.13 fabric8-analytics|red|0.3.10 vscode-xml|red|0.26.1 vscode-yaml|red|1.13.0 LiveServer|rit|5.7.9 partial-diff|ryu|1.4.3 vscode-ts-decorators|sem|1.0.2 epack|Sey|2.3.0 markdown-preview-enhanced|shd|0.6.8 autoimport|ste|1.5.4 code-spell-checker|str|2.20.5 vscode-stylelint|sty|1.2.4 open-in-browser|tec|2.0.0 errorlens|use|3.12.0 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vim|vsc|1.25.2 vscode-todo-highlight|way|1.0.5 change-case|wma|1.0.0 JavaScriptSnippets|xab|1.8.0 markdown-all-in-one|yzh|3.5.1 material-theme|zhu|3.15.18 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931:30280409 vshan820:30294714 vstes263:30335439 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30789496 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 showlangstatbar:30737416 vsctsb:30748421 pythonms35:30701012 a2ce3375:30757347 pythonfmttext:30731395 pythoncmv:30756943 fixshowwlkth:30771522 showindicator:30785052 pythongtdpath:30769146 bgfeh915:30780428 pythonnosmt12:30779714 pythonidxpt:30784022 pythonnocebcf:30776496 h7j2d465:30786200 dsvsc013cf:30789518 ```
vscodenpa commented 1 year ago

Please diagnose the root cause of the issue by running the command F1 > Help: Troubleshoot Issue and following the instructions. Once you have done that, please update the issue with the results.

Happy Coding!

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!