Optimizer fails when running yarn start in Kibana version 8

I'm in the process of upgrading our custom plugins to Kibana version 8. I'm trying to setup Kibana and Elasticsearch through docker. In the past, I built Kibana using a Dockerfile that would clone Kibana and then run yarn kbn bootstrap. I can still do this with Kibana 8. However, when I connect to the Kibana container and run a yarn start, it bombs out during the optimizer commands. I can never get it to run. It doesn't matter what subversion of 8 I run, I cannot get past the optimizer steps. Here's the type of errors I'm getting.

np bld    log   [22:56:29.127] [info][@kbn/optimizer] [6/146] initial bundle builds complete
 np bld    log   [22:56:39.280] [info][@kbn/optimizer] [9/146] initial bundle builds complete
 [@kbn/optimizer] fatal error  Error: worker exitted unexpectedly with code null [last message: { bundleId: 'actions', type: 'compiler success', moduleCount: 12 }]
    at /kibana/node_modules/@kbn/optimizer/target_node/src/optimizer/observe_worker.js:147:13
    at /kibana/node_modules/rxjs/dist/cjs/internal/operators/map.js:10:37
    at OperatorSubscriber._this._next (/kibana/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at OperatorSubscriber.Subscriber.next (/kibana/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at ChildProcess.handler (/kibana/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js:59:31)
    at ChildProcess.emit (node:events:525:35)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
error Command failed with exit code 1.

I found the issue to my problem and wanted to leave an update here in case anyone else is trying to run a development version of Kibana version 8 within a docker container. There's a parameter within the docker-compose.yml file that is listed on the Kibana 8 setup pages called mem_limit. This is set to a little over 1Gb. I had to increase this to 4Gb to get the optizimation steps to work. Even with it set to 4Gb, it would still crash and I'd have to restart it a couple times before it would finish optimizing all the bundles.

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