# Kibana 6.2.4 on Windows hangs & fails during plugin installation: "Optimizing and caching browser bundles"

**URL:** <https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678>\
**Category:** Kibana\
**Created:** [May 21, 2018, 4:47pm UTC](https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678 "2018-05-21T16:47:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BradVido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradvido/32/741_2.png) [@BradVido](https://discuss.elastic.co/u/BradVido)\
**Post date:** [May 21, 2018, 4:47pm UTC](https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678/1 "2018-05-21T16:47:10Z")

</div>

On Windows, I execute this:  
`J:\elastic\kibana>bin\kibana-plugin.bat install x-pack`

After about 15 minutes, I get this error  
Transferring 4942599 bytes....................  
Transfer complete  
Retrieving metadata from plugin archive  
Extracting plugin archive  
Extraction complete  
Optimizing and caching browser bundles... **\<--Stalls here for a long time**

```
<--- Last few GCs --->

 6705195 ms: Mark-sweep 5773.7 (8037.4) -> 5773.7 (8037.4) MB, 15320.1 / 0.0 ms [allocation failure] [scavenge might not succeed].
 6720227 ms: Mark-sweep 5773.7 (8037.4) -> 5773.7 (8037.4) MB, 15030.3 / 0.0 ms [allocation failure] [scavenge might not succeed].
 6735706 ms: Mark-sweep 5773.7 (8037.4) -> 5790.5 (8020.4) MB, 15476.5 / 0.0 ms [last resort gc].
 6750836 ms: Mark-sweep 5790.5 (8020.4) -> 5808.1 (8019.4) MB, 15129.0 / 0.0 ms [last resort gc].

<--- JS stacktrace --->

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

```

I have executed this command before running the kibana-plugin.bat file:  
`set NODE_OPTIONS=--max-old-space-size=4096`

But still get the same error.

How can this be fixed?

---

<div class="post-metadata">

**Author:** ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)\
**Post date:** [May 21, 2018, 5:27pm UTC](https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678/2 "2018-05-21T17:27:46Z")

</div>

Interesting. Fifteen minutes is quite a long time. The optimizer usually completes in less than a minute, but of course it is dependent on your machine's capabilities.

How much RAM does the machine in question have?

---

<div class="post-metadata">

**Author:** ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)\
**Post date:** [May 21, 2018, 6:56pm UTC](https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678/3 "2018-05-21T18:56:30Z")

</div>

One other thing I should note is that x-pack comes bundled in 6.3 (which should come out in 8 days or so). So, you should be able to bypass the install step and that might get you up and working without necessary tinkering.

---

<div class="post-metadata">

**Author:** ![BradVido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradvido/32/741_2.png) [@BradVido](https://discuss.elastic.co/u/BradVido)\
**Post date:** [May 23, 2018, 8:58pm UTC](https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678/4 "2018-05-23T20:58:11Z")

</div>

Thanks for the tip, but this optimization step happens with the install of every plugin, not just x-pack.  
It hangs for every plugin.

The machine has 32GB of RAM and SSD. It performs very well of all other aspects.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2018, 8:58pm UTC](https://discuss.elastic.co/t/kibana-6-2-4-on-windows-hangs-fails-during-plugin-installation-optimizing-and-caching-browser-bundles/132678/5 "2018-06-20T20:58:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
