Typescript: 140 GB tsserver log file

Created on 16 Apr 2019  ·  8Comments  ·  Source: microsoft/TypeScript


  • VSCode Version: 1.33.1
  • OS Version: Windows 10 Pro x64

Steps to Reproduce: i don't know

I usually do not close Visual Studio Code leaving it in the background and use hibernation instead of turning it off or rebooting it. Today I noticed that my 250GB SSD was fully used. Looking for the reason, I found a 140 Gbyte TypeScript server log file. I don't know how this happened or if it's possible to repeat the error, but I'm sure you can limit the size of the log file.

Does this issue occur when all extensions are disabled?: can't check

image

Bug External

Most helpful comment

Turn off logging by setting "typescript.tsserver.log": "off". Only enable logging while investigating an issue with JavaScript or TypeScript

Moving this issue upstream to continue investigating why the logs grow this large

All 8 comments

I was also able to open this file somehow and found lines that are repeated millions (or billions) of times:

Err 647510[21:7:23.453] Exception on executing command unknown:

    Cannot read property 'close' of undefined

    TypeError: Cannot read property 'close' of undefined
        at FSEvent.FSWatcher._handle.onchange (fs.js:1385:22)

image

First 20k lines of log (before the flood started).
first-20k.txt

Turn off logging by setting "typescript.tsserver.log": "off". Only enable logging while investigating an issue with JavaScript or TypeScript

Moving this issue upstream to continue investigating why the logs grow this large

TypeScript 3.4.3

From the logs, it looks like the directory watcher is being triggered rapidly, for example:

Info 2497 [13:50:57.66] Elapsed:: 13ms DirectoryWatcher:: Triggered with p:/my-project/node_modules/typescript/lib/lib.es2016.full.d.ts :: WatchInfo: p:/my-project/node_modules 1 Project: p:/my-project/tsconfig.json WatchType: Failed Lookup Locations
Info 2498 [13:50:57.66] DirectoryWatcher:: Triggered with p:/my-project/node_modules/typescript/lib/lib.es2016.full.d.ts :: WatchInfo: p:/my-project/node_modules 1 Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations
Info 2499 [13:50:57.71] Elapsed:: 5ms DirectoryWatcher:: Triggered with p:/my-project/node_modules/typescript/lib/lib.es2016.full.d.ts :: WatchInfo: p:/my-project/node_modules 1 Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations

image
Hey there 👋
Don't forget about this problem, please.

I think I got the same issue where I guess this is even making my VSC taking up 50% of my CPU for some reason. It happens randomly unfortunately...

image

@sebas2day The problem is probably related to FSWatcher then.

I am unable to repro this any more. Please reopen if you can repro this with typescript@next and vscode latest version. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fwanicka picture fwanicka  ·  3Comments

siddjain picture siddjain  ·  3Comments

manekinekko picture manekinekko  ·  3Comments

Antony-Jones picture Antony-Jones  ·  3Comments

remojansen picture remojansen  ·  3Comments