vscode: tslintServer.js and tsserver.js has memory leak
the memory allocated to electron_node tslintServer.js keep increasing until all memory used by it.
update: Then I removed this plugin, then after restart the tsServer.js keep allocating memory.
update 2: I find I installed tslint deprecated plugin. I uninstall it and install the latest version.
Now the problem became tsserver.js has memory leak
update 3: I downgrade to vs to: Version: 1.39.2 Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390 There is no memory leak problem in this version.
Bug happened on version:
Version: 1.40.2 Commit: f359dd69833dd8800b54d458f6d37ab7c78df520 Date: 2019-11-25T14:54:40.719Z Electron: 6.1.5 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Linux x64 4.9.0-9-amd64
Steps to Reproduce: unknown, after upgrade to this version, when tslint start work, it keep eat the memory until all memory used.
Does this issue occur when all extensions are disabled?: No
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 14
- Comments: 35 (9 by maintainers)
The number of issues related to this is growing. This is definitely a VSCode issue. The tsserver.js process is ignoring the new --max_old_space_size parameter and using up as much RAM as possible.
Our current VS Code 1.43 insiders build now include Electron 7 which has the fix.
Let me know if you still see this issue using VS Code 1.43+
It is a V8 bug and Google has just fixed it, see my detailed analysis https://gist.github.com/likev/2521f6cde21215e8fe6f53d4c6370fa8
maybe we need a feature that limiting the maximum vscode memory usage,
and dump related info for debugging automatically to help the ms team to fix it.
update: I created a feature request for this:
https://github.com/microsoft/vscode/issues/86746
Hi I have tslint installed, the latest version. the problem not always happen, but once it happens, it is too late to run any command until there is no memory left, then the system kill the vscode.
I will try to make it, but I see lots of people has the same issue.
Thanks.
#85777
Visual Studio Code almost killed my Kubuntu 18.04 machine with 32GB of memory 3 times today. Although system was extremely unresponsive I manged (I had to resist the urge to just reset the system) to trigger “kill window” functionality (Alt+Ctrl+Esc) and click Visual Studio Code window each time. As a result, RAM was cleaned up and I could continue working.
EDIT 3
For avoiding lockdown due to RAM shortage this command can be used on Linux (tried it with Ubuntu 18.04 LTS, should work on other systemd-based distributions):
I didn’t see any side effects versus running the
code
directly so far.I noticed that the previous version has no problem, and the difference between them is the Electron version. before is Electron 4, and the 1.40.2 use Electron: 6.1.5 could this be a problem?
I have disabled the tslint plugin. @mjbvz