Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/dev/build/tasks/bin/scripts/kibana
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ if [ -f "${CONFIG_DIR}/node.options" ]; then
KBN_NODE_OPTS="$(grep -v ^# < ${CONFIG_DIR}/node.options | xargs)"
fi

NODE_OPTIONS="--no-warnings --max-http-header-size=65536 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" "${@}"
# Enable capturing heap snapshots. See https://nodejs.org/api/cli.html#--heapsnapshot-signalsignal
# For now only on POSIX platforms, term signals work differently on Windows.
NODE_OPTIONS_HEAPSNAPSHOT_DEFAULT="${NODE_OPTIONS_HEAPSNAPSHOT_DEFAULT:---heapsnapshot-signal=SIGUSR2 --diagnostic-dir=$DIR/data}"

NODE_OPTIONS="--no-warnings --max-http-header-size=65536 $NODE_OPTIONS_HEAPSNAPSHOT_DEFAULT $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" "${@}"
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ COPY --chown=1000:0 config/serverless.yml /usr/share/kibana/config/serverless.ym
COPY --chown=1000:0 config/serverless.es.yml /usr/share/kibana/config/serverless.es.yml
COPY --chown=1000:0 config/serverless.oblt.yml /usr/share/kibana/config/serverless.oblt.yml
COPY --chown=1000:0 config/serverless.security.yml /usr/share/kibana/config/serverless.security.yml
# Supportability enhancement: enable capturing heap snapshots. See https://nodejs.org/api/cli.html#--heapsnapshot-signalsignal
RUN /usr/bin/echo -e '\n--heapsnapshot-signal=SIGUSR2' >> config/node.options
RUN /usr/bin/echo '--diagnostic-dir=./data' >> config/node.options
ENV PROFILER_SIGNAL=SIGUSR1
{{/serverless}}
{{^opensslLegacyProvider}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ group="kibana"

KBN_PATH_CONF="/etc/kibana"
RESTART_ON_UPGRADE="true"

NODE_OPTIONS_HEAPSNAPSHOT_DEFAULT="--heapsnapshot-signal=SIGUSR2 --diagnostic-dir=/var/lib/kibana"