Skip to content
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

How can I keep the connections in the connection pool always alive? #257

Open
donggyu04 opened this issue Sep 12, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@donggyu04
Copy link

If there is no request for a certain amount of idle time for OpenSearch, an error occurs when a request is sent to Logstash afterward.

Attempted to send a bulk request but there are no living connections in the pool (perhaps OpenSearch is unreachable or down?) {:message=>"No Available connections", :exception=>LogStash::Outputs::OpenSearch::HttpClient::Pool::NoConnectionAvailableError, :will_retry_in_seconds=>16}

The OpenSearch server has no problem, and the requests are processed successfully as the connection is re-established during the retry process.

It seems that the stale connections in the connection pool are not being refreshed properly.
In this cases, is there a way to manage the connections in the connection pool to ensure they are always kept alive?

There is a validate_after_inactivity setting, but it doesn't seem to work as I want it to.
Would enabling sniffing help in this case?

Thanks in advance.

@dblock
Copy link
Member

dblock commented Sep 12, 2024

This sounds like a bug, will likely require more digging :(

@dblock dblock added bug Something isn't working and removed untriaged labels Sep 12, 2024
@donggyu04
Copy link
Author

@dblock

Hi, Thanks for your reply.
It is not easy to reproduce this phenomenon.

in my case, this occurred when logstash was idle for a long time without any calls after connecting to OpenSearch.
You may be able to reproduce it by calling a few hours or a day later (This may vary depending on the environment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants