You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using spring-data-jest to communicate with AWS Elasticsearch service and have been running into some SocketTimeoutExceptions. My hunch is there are connection(s) in my connection pool which have been terminated by the server due to no activity happening for a certain period of time. After one SocketTimeoutException, a subsequent request seems to make it through.
Looking around in searchbox-io's Jest repo, I noticed an idle connection reaper was put in some time back. However, it appears you must opt-in by setting a maxConnectionIdleTime on the HttpClientConfig when building the JestClient.
Might I propose exposing the ability to configure a maxConnectionIdleTime (via configuration properties), with a default value such that the connection reaper is disabled without setting the property so that it's opt-in functionality? Then consuming this property in the auto configuration class which creates the JestClient. I've opened a PR illustrating this here:
I am using spring-data-jest to communicate with AWS Elasticsearch service and have been running into some SocketTimeoutExceptions. My hunch is there are connection(s) in my connection pool which have been terminated by the server due to no activity happening for a certain period of time. After one SocketTimeoutException, a subsequent request seems to make it through.
Looking around in searchbox-io's Jest repo, I noticed an idle connection reaper was put in some time back. However, it appears you must opt-in by setting a
maxConnectionIdleTime
on theHttpClientConfig
when building theJestClient
.Might I propose exposing the ability to configure a
maxConnectionIdleTime
(via configuration properties), with a default value such that the connection reaper is disabled without setting the property so that it's opt-in functionality? Then consuming this property in the auto configuration class which creates the JestClient. I've opened a PR illustrating this here:#68
More info here: searchbox-io/Jest#149
With example usage here: https://github.com/searchbox-io/Jest/blob/v2.0.4/jest/src/test/java/io/searchbox/client/JestClientFactoryIntegrationTest.java#L116
Cheers!
The text was updated successfully, but these errors were encountered: