Skip to content

[Elasticsearch] Log queued requests#152571

Merged
afharo merged 3 commits intoelastic:mainfrom
afharo:elasticsearch/log-queued-requests
Mar 6, 2023
Merged

[Elasticsearch] Log queued requests#152571
afharo merged 3 commits intoelastic:mainfrom
afharo:elasticsearch/log-queued-requests

Conversation

@afharo
Copy link
Member

@afharo afharo commented Mar 2, 2023

Summary

Resolves #152452.

It logs a warning when the HTTP Agent handling Elasticsearch connections has queued requests waiting for an available socket.

This will increase the observability of how the shared HTTP Agents are performing and will unblock the work in #151911.

Checklist

For maintainers

How to test

Setting elasticsearch.maxSockets: 1 in kibana.yml should make the log show whenever there's anything requesting information from ES (a user is logging in or a dashboard is refreshing).

@afharo afharo added Feature:elasticsearch Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 2, 2023
@afharo afharo force-pushed the elasticsearch/log-queued-requests branch from 08237b7 to 604ccb8 Compare March 2, 2023 13:46
Comment on lines 81 to 90
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the calculation logic closer to the Agent Manager so that we didn't need to expose the logger publicly.

At the same time, it feels safer if we are not exposing the agents publicly for anyone else to tamper with.

@afharo afharo self-assigned this Mar 2, 2023
@afharo afharo force-pushed the elasticsearch/log-queued-requests branch from 46ef750 to e690128 Compare March 2, 2023 14:00
@afharo afharo force-pushed the elasticsearch/log-queued-requests branch from e690128 to 75e8b86 Compare March 2, 2023 14:03
@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/core-elasticsearch-client-server-internal 14 12 -2
@kbn/core-elasticsearch-client-server-mocks 34 33 -1
total -3
Unknown metric groups

API count

id before after diff
@kbn/core-elasticsearch-client-server-mocks 38 37 -1

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 506 508 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @afharo

@afharo afharo marked this pull request as ready for review March 2, 2023 15:38
@afharo afharo requested a review from a team as a code owner March 2, 2023 15:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@afharo afharo merged commit f10777e into elastic:main Mar 6, 2023
@afharo afharo deleted the elasticsearch/log-queued-requests branch March 6, 2023 13:25
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 2023
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:elasticsearch release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v8.8.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Elasticsearch] Warn log when the open sockets count reaches the maxSockets limit

5 participants