Prevent kibana crashing when multiple processes start APM telemetry task#87645
Prevent kibana crashing when multiple processes start APM telemetry task#87645rudolf merged 2 commits intoelastic:masterfrom
Conversation
dgieselaar
left a comment
There was a problem hiding this comment.
LGTM - why does runNow throw if another process already started this task though?
|
Pinging @elastic/apm-ui (Team:apm) |
Good question. @elastic/kibana-alerting-services @gmmorris |
|
@elasticmachine merge upstream |
Based on this PR, the runNow API returns a promise that identifies if the task completed successfully or not (including error messages, etc). In the scenario the task is currently running (possibly by another Kibana instance), the API will throw since it can't capture the outcome. (@gmmorris keep me honest). |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…ask in parallel (elastic#87645) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…ask in parallel (elastic#87645) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
When multiple Kibana process are started in parallel they all attempt to start the
apm-telemetry-tasktask in parallel. Because thetaskManagerStart.runNowpromise wasn't awaited it would sometimes cause an unhandled promise rejection when another process already started this task and crash Kibana.Release notes
Fixed a bug that would sometimes cause the Kibana process to crash with
Error: Failed to run task "apm-telemetry-task" as it is currently running.Checklist
Delete any items that are not applicable to this PR.
For maintainers