-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent kibana crashing when multiple processes start APM telemetry task #87645
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
…ask in parallel (elastic#87645) Co-authored-by: Kibana Machine <[email protected]>
…ask in parallel (#87645) (#87923) Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
…ask in parallel (#87645) (#87924) Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
When multiple Kibana process are started in parallel they all attempt to start the
apm-telemetry-task
task in parallel. Because thetaskManagerStart.runNow
promise 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