# Kibana 7.5.2 Startup Exception: "Error: Optimizations failure"

**URL:** <https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650>\
**Category:** Kibana\
**Created:** [February 10, 2020, 5:23pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650 "2020-02-10T17:23:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshapiro001](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jshapiro001](https://discuss.elastic.co/u/jshapiro001)\
**Post date:** [February 10, 2020, 5:23pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650/1 "2020-02-10T17:23:52Z")

</div>

I'm deploying Elasticsearch and Kibana on to OpenShift via a template yaml file. ES is deployed without issue, but I'm having trouble getting Kibana to start. Here are the details:

> **Template YML Configuration**
>
> ```
> - apiVersion: v1
> kind: DeploymentConfig
> metadata:
> name: kibana
> spec:
> replicas: 1
> template:
> metadata:
> labels:
> app: kibana
> component: kibana
> addonmanager.kubernetes.io/mode: Reconcile
> spec:
> securityContext:
> privileged: false
> capabilities:
> add:
> - IPC_LOCK
> - SYS_RESOURCE
> serviceAccountName: scc-ai-elasticsearch
> containers:
> - name: kibana
> image: docker.elastic.co/kibana/kibana:7.5.2
> imagePullPolicy: IfNotPresent
> env:
> - name: "CLUSTER_NAME"
> value: "elasticsearch"
> - name: XPACK_SECURITY_ENABLED
> value: 'false'
> - name: XPACK_GRAPH_ENABLED
> value: 'false'
> - name: XPACK_ML_ENABLED
> value: 'false'
> - name: XPACK_REPORTING_ENABLED
> value: 'false'
> - name: XPACK_GROKDEBUGGER_ENABLED
> value: 'false'
> - name: XPACK_INFRA_ENABLED
> value: 'false'
> - name: XPACK_SEARCHPROFILER_ENABLED
> value: 'false'
> - name: XPACK_LICENSE_MANAGEMENT_ENABLED
> value: 'false'
> resources:
> limits:
> cpu: 2000m
> memory: 2Gi
> requests:
> cpu: 500m
> memory: 1Gi
> ports:
> - name: ui
> containerPort: 5601
> protocol: TCP
> 
> ```

> **Error Log**
>
> {"type":"log","@timestamp":"2020-02-10T16:09:57Z","tags":["info","optimize"],"pid":9,"message":"Optimizing and caching bundles for core, monitoring, space\_selector, dashboardViewer, apm, maps, canvas, siem, uptime, lens, status\_page, kibana, timelion and stateSessionStorageRedirect. This may take a few minutes"}  
> {"type":"log","@timestamp":"2020-02-10T16:14:03Z","tags":["fatal","root"],"pid":9,"message":"{ Error: Optimizations failure.\n 6622 modules\n \n ERROR in commons.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)\n \n ERROR in canvas.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)\n \n ERROR in kibana.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)\n\n at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base\_optimizer.js:440:26)\n at compiler.run (/usr/share/kibana/src/optimize/fs\_optimizer.js:43:26)\n at finalCallback (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:257:39)\n at hooks.done.callAsync.err (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:273:13)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n at onCompiled (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:271:21)\n at hooks.afterCompile.callAsync.err (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:681:15)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n at compilation.seal.err (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:678:31)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n at hooks.optimizeAssets.callAsync.err (/usr/share/kibana/node\_modules/webpack/lib/Compilation.js:1423:35)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n cause:\n { Error: Optimizations failure.\n 6622 modules\n \n ERROR in commons.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)\n \n ERROR in canvas.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)\n \n ERROR in kibana.bundle.js from Terser\n Error: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)\n \n at FsOptimizer.failedStatsToError (/usr/share/kibana/src/optimize/base\_optimizer.js:440:26)\n at compiler.run (/usr/share/kibana/src/optimize/fs\_optimizer.js:43:26)\n at finalCallback (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:257:39)\n at hooks.done.callAsync.err (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:273:13)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n at onCompiled (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:271:21)\n at hooks.afterCompile.callAsync.err (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:681:15)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n at compilation.seal.err (/usr/share/kibana/node\_modules/webpack/lib/Compiler.js:678:31)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n at hooks.optimizeAssets.callAsync.err (/usr/share/kibana/node\_modules/webpack/lib/Compilation.js:1423:35)\n at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)\n at AsyncSeriesHook.lazyCompileHook (/usr/share/kibana/node\_modules/webpack/node\_modules/tapable/lib/Hook.js:154:20)\n data:\n { errors: [Array],\n warnings: ,\n version: '4.41.0',\n hash: '605a4ec3920626053e02',\n time: 243613,\n builtAt: 1581351242808,\n publicPath: ' **REPLACE\_WITH\_PUBLIC\_PATH**',\n outputPath: '/usr/share/kibana/optimize/bundles',\n assetsByChunkName: [Object],\n assets: [Array],\n filteredAssets: 0,\n entrypoints: [Object],\n namedChunkGroups: [Object],\n chunks: [Array],\n modules: [Array],\n filteredModules: 0,\n logging: [Object],\n children: [Array] },\n isBoom: true,\n isServer: true,\n output: { statusCode: 500, payload: [Object], headers: {} },\n reformat: [Function],\n typeof: [Function: internal] },\n isOperational: true,\n data:\n { errors:\n ['commons.bundle.js from Terser\nError: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)',\n 'canvas.bundle.js from Terser\nError: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)',\n 'kibana.bundle.js from Terser\nError: Call retries were exceeded\n at ChildProcessWorker.initialize (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)\n at ChildProcessWorker.onExit (/usr/share/kibana/node\_modules/jest-worker/build/workers/ChildProcessWorker.js:263:12)\n at ChildProcess.emit (events.js:189:13)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:248:12)'],\n warnings: ,\n version: '4.41.0',\n hash: '605a4ec3920626053e02',\n time: 243613,\n builtAt: 1581351242808,\n publicPath: ' **REPLACE\_WITH\_PUBLIC\_PATH**',\n outputPath: '/usr/share/kibana/optimize/bundles',\n assetsByChunkName:\n { commons: [Array],\n apm: [Array],\n canvas: [Array],\n core: 'core.bundle.js',\n dark\_theme: [Array],\n dashboardViewer: 'dashboardViewer.bundle.js',\n kibana: [Array],\n lens: 'lens.bundle.js',\n light\_theme: [Array],\n maps: 'maps.bundle.js',\n monitoring: [Array],\n 'plugin/advancedUiActions': 'plugin/advancedUiActions.bundle.js',\n 'plugin/data': 'plugin/data.bundle.js',\n 'plugin/embeddable': 'plugin/embeddable.bundle.js',\n 'plugin/eui\_utils': 'plugin/eui\_utils.bundle.js',\n 'plugin/expressions': 'plugin/expressions.bundle.js',\n 'plugin/inspector': 'plugin/inspector.bundle.js',\n 'plugin/newsfeed': 'plugin/newsfeed.bundle.js',\n 'plugin/uiActions': 'plugin/uiActions.bundle.js',\n siem: 'siem.bundle.js',\n  
> (...cut due to char limits for this post)

... any suggestions would be much appreciated!

---

<div class="post-metadata">

**Author:** ![rudolf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rudolf/32/51200_2.png) [@rudolf](https://discuss.elastic.co/u/rudolf)\
**Post date:** [February 11, 2020, 12:02pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650/2 "2020-02-11T12:02:27Z")

</div>

Since the docker image you're using includes X-pack plugins, that container also includes pre-built javascript bundles. When you disable these plugins with configuration, Kibana needs to rebuild the javascript bundles which is very memory intensive. The 2Gi memory allocation is probably not sufficient and you should be able to get by with 4Gi memory.

Another option is to build an intermediate image while allocating at least 4Gi. Once built, you should be able to run the image with 2Gi of memory.

---

<div class="post-metadata">

**Author:** ![jshapiro001](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jshapiro001](https://discuss.elastic.co/u/jshapiro001)\
**Post date:** [February 11, 2020, 2:15pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650/3 "2020-02-11T14:15:57Z")

</div>

Thank you! I'll give this a try...

---

<div class="post-metadata">

**Author:** ![jshapiro001](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@jshapiro001](https://discuss.elastic.co/u/jshapiro001)\
**Post date:** [February 18, 2020, 2:43pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650/4 "2020-02-18T14:43:46Z")

</div>

That worked! Thanks again!

---

<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:** [March 17, 2020, 2:43pm UTC](https://discuss.elastic.co/t/kibana-7-5-2-startup-exception-error-optimizations-failure/218650/5 "2020-03-17T14:43:54Z")

</div>

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