Kibana 6.5.0 Javascript heap out of memory

(Jack Lauret) #1

Hi all,

I have installed Kibana 6.5.0 to replace 6.4.0 on my Windows box.
After starting Kibana now says
Optimizing and caching bundles for ml, stateSessionStorageRedirect, status_page, timelion, graph, monitoring, space_selector, login, logout, dashboardViewer, apm, canvas, infra and kibana. This may take a few minutes.

This takes a while and then Kibana quits with the following error:

<--- Last few GCs --->

[7816:0000027E4246DF80] 1135506 ms: Mark-sweep 1310.1 (1433.8) -> 1310.1 (1434.8) MB, 1717.6 / 0.0 ms allocation failure GC in old space requested
[7816:0000027E4246DF80] 1137275 ms: Mark-sweep 1310.1 (1434.8) -> 1310.1 (1418.3) MB, 1769.1 / 0.0 ms last resort GC in old space requested
[7816:0000027E4246DF80] 1139281 ms: Mark-sweep 1310.1 (1418.3) -> 1310.1 (1418.3) MB, 2005.5 / 0.0 ms last resort GC in old space requested

<--- JS stacktrace --->

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

Security context: 0000026F7E7A5879
0: builtin exit frame: lastIndexOf(this=0000034320F2E461 <Very long string[5037308]>,0000033505F8CA51 <String[1]: \n>)

1: has_nlb(aka has_nlb) [000001A94B0022D1 :5970] [bytecode=000001D6CB3361C9 offset=15](this=000001A94B0022D1 )
2: /* anonymous /(aka / anonymous */) [000001A94B0022D1 :6070] [bytecode=000003ED772A0AF9 offset=60](this=000001A94B0...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node_module_register
2: v8::internal::FatalProcessOutOfMemory
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal:: Factory::NewRawTwoByteString
5: v8::internal::Smi::SmiPrint
6: v8::internal::StackGuard::HandleInterrupts
7: v8::internal::SlicedString::SlicedStringGet
8: v8_inspector::protocol::Debugger::API::SearchMatch::fromJSONString
9: v8_inspector::protocol::Debugger::API::SearchMatch::fromJSONString
10: 0000010D32C06B21

I can imagine that I have to increase the java heap size. But how to do this on my Windows box?

Any help is highly appreciated.

(Thomas Neirynck) #2

hi @drjackal,

actually, it's the nodejs heap you'd have to increase. you should not have to touch your JVM.

you can pass in the NODE_OPTIONS when starting kibana.

see for details.

Restarting Kibana sometimes does the trick to, YMMV.

(Jack Lauret) #3

Well, @thomasneirynck, that did the job.

I started node.exe manually with --max_old_space_size=4096 and Kibana started and optimized the bundles. (node.exe" --max_old_space_size=4096 --no-warnings "D:\ELK-Stack\kibana-6.5.0\src\cli")
Now I can start kibana without add --max_old_space_size=4096.

Thank you!