Skip to content
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

Add --max-old-space-size=8192 argument to bin/kibana script to avoid running out of memory during optimize step. #12232

Closed

Conversation

cjcenizal
Copy link
Contributor

I started consistently getting these errors every time I tried to build Kibana:

<--- Last few GCs --->

   52512 ms: Mark-sweep 941.8 (1311.1) -> 931.6 (1287.5) MB, 368.5 / 0.0 ms [allocation failure] [GC in old space requested].
   52853 ms: Mark-sweep 931.6 (1287.5) -> 922.6 (1272.5) MB, 341.1 / 0.0 ms [allocation failure] [GC in old space requested].
   53235 ms: Mark-sweep 922.6 (1272.5) -> 922.1 (1193.5) MB, 381.8 / 0.0 ms [last resort gc].
   53563 ms: Mark-sweep 922.1 (1193.5) -> 922.1 (1160.5) MB, 327.8 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1400a5cfb39 <JS Object>
    1: SparseJoinWithSeparatorJS(aka SparseJoinWithSeparatorJS) [native array.js:~75] [pc=0x133f2225ba77] (this=0x1400a504381 <undefined>,w=0x1fcf0266b191 <JS Array[55178]>,F=0x39dab2fae461 <JS Array[55178]>,x=55178,I=0x1400a5b46c9 <JS Function ConvertToString (SharedFunctionInfo 0x1400a552dc9)>,J=0x39dab2fdb779 <String[6]\: ,\n    >)
    2: DoJoin(aka DoJoin) [native array.js:~129] [pc=0x133f22...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/cjcenizal/.nvm/versions/node/v6.10.2/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/cjcenizal/.nvm/versions/node/v6.10.2/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/cjcenizal/.nvm/versions/node/v6.10.2/bin/node]
 4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/cjcenizal/.nvm/versions/node/v6.10.2/bin/node]
 5: v8::internal::Runtime_SparseJoinWithSeparator(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/cjcenizal/.nvm/versions/node/v6.10.2/bin/node]
 6: 0x133f1e2092a7

By adding this flag, we allow the V8 engine to allocate 8GB of memory (I think). When I added this flag, I stopped encountering these errors.

@cjcenizal
Copy link
Contributor Author

cjcenizal commented Jun 7, 2017

I just found #6727. Maybe we should implement the solution it requests instead of this?

Also related:

I wonder if I should just close this and instead set this option via the command line when I run Kibana?

@cjcenizal cjcenizal closed this Jun 7, 2017
@cjcenizal cjcenizal deleted the chore/node-max-old-space-size branch June 7, 2017 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant