-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript heap out of memory #835
Comments
I am facing this issue too. |
I'm getting this on my Mac Pro w/32gb, running on TypeScript itself. Expecting another 32gb to arrive next week, I'll try again then. |
Does anyone have a project which causes this behavior published? I'd like to do some debugging to see if I can figure out where the issue is. |
Like I said, I got this running in |
Ah, that's what you meant by running on TypeScript. Thanks! I hope to be able to fix this, as soon as I can get strict null checks turned on I'll take a look. |
FWIW, just tried with 64gb, still getting node OOM, but it didn't put any pressure on the system, never went below about 20gb free. |
We're getting this as well on our large project. As a workaround, we're doing this: "scripts": {
"docs": "cross-env NODE_OPTIONS=--max_old_space_size=8192 typedoc [...]"
} It uses the |
Much later than I'd have liked, but I started taking a look at this today. There may have been an unintentional (partial?) fix, as TypeDoc handled the TypeScript repo just fine, never going over 1.6gb ram. This still seems high to me, so I'm going to keep looking at it. What I've done: git clone https://github.com/TypeStrong/typedoc.git
cd typedoc
npm i
npm run build
git clone https://github.com/Microsoft/TypeScript.git
cd TypeScript
npm i
npm run build
node ../typedoc/bin/typedoc src --json typedoc.json --tsconfig src/tsconfig.json --ignoreCompilerErrors This resulted in a 1298043 line json file. If anyone has a project where TypeDoc still runs out of memory from the master branch, it should help me track down any remaining issues. |
Closing as this seems to be fixed, please open a new issue if you run into this problem again. |
I had similar OOM issues after upgrading to typedoc 0.15.0-0 which I resolved by downgrading to 0.14.2. I think this issue should be re-opened.
You can see the full build logs here, but the build setup has a few layers to it because we use typedoc through documentalist. I will try to come back with more details to pinpoint the issue. This is a large TS project, but I still had the issue when I restricted typedoc to running on only one of the packages in the monorepo instead of all of them. |
@adidahiya could you open a new issue with this? I suspect it is a different issue from the original cause as the inadvertent fix in 0.14.something worked. |
Hi @Gerrit0, I'm also getting the same error on my repo https://github.com/pirix-gh/ts-toolbelt
This happens since my last update, where I made type distribution a default. So I suspect that typedoc tries to unfold types too much. I'd be nice if it could preserve the type "as it is" in the code. |
/usr/local/bin/node /usr/local/Cellar/yarn/1.9.4/libexec/bin/yarn.js run documentation
yarn run v1.9.4
$ typedoc --out ./documentation ./src --ignoreCompilerErrors
Using TypeScript 2.7.2 from /Users/kepro/myproject/node_modules/typedoc/node_modules/typescript/lib
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
<--- Last few GCs --->
1: 0x100038460 node::Abort() [/usr/local/Cellar/node/10.8.0/bin/node]
2: 0x1000385ea node::FatalTryCatch::~FatalTryCatch() [/usr/local/Cellar/node/10.8.0/bin/node]
3: 0x1001881eb v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/10.8.0/bin/node]
[12470:0x104002400] 41111 ms: Scavenge 1385.4 (1422.7) -> 1384.7 (1423.2) MB, 3.7 / 0.0 ms (average mu = 0.194, current mu = 0.182) allocation failure
[12470:0x104002400] 41122 ms: Scavenge 1385.5 (1423.2) -> 1384.9 (1424.2) MB, 6.3 / 0.0 ms (average mu = 0.194, current mu = 0.182) allocation failure
[12470:0x104002400] 41131 ms: Scavenge 1385.7 (1424.2) -> 1385.0 (1424.7) MB, 3.1 / 0.0 ms (average mu = 0.194, current mu = 0.182) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x904b7e1e789
2: getLiteralTypeFromPropertyName(aka getLiteralTypeFromPropertyName) [0x90415c8dae9] [/Users/myproject/node_modules/typedoc/node_modules/typescript/lib/typescript.js:~31511] [pc=0xda7b3de8da](this=0x904454022e1 ,prop=0x90410a97ed1 )
3:...
4: 0x10018818d v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/10.8.0/bin/node]
5: 0x100461052 v8::internal::Heap::UpdateSurvivalStatistics(int) [/usr/local/Cellar/node/10.8.0/bin/node]
6: 0x100462cf5 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/local/Cellar/node/10.8.0/bin/node]
7: 0x1004603b7 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/Cellar/node/10.8.0/bin/node]
8: 0x10045f308 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/10.8.0/bin/node]
9: 0x100467507 v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/10.8.0/bin/node]
10: 0x100446f64 v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/Cellar/node/10.8.0/bin/node]
11: 0x10052d597 v8::internal::String::SlowFlatten(v8::internal::Handlev8::internal::ConsString, v8::internal::PretenureFlag) [/usr/local/Cellar/node/10.8.0/bin/node]
12: 0x100548670 v8::internal::String::SlowEquals(v8::internal::Handlev8::internal::String, v8::internal::Handlev8::internal::String) [/usr/local/Cellar/node/10.8.0/bin/node]
13: 0x1006844a8 v8::internal::Runtime_StringEqual(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/Cellar/node/10.8.0/bin/node]
14: 0xda7ad041bd
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: