Elasticsearch Java High Level REST Client Establish A Bunch of TCP Connection and Don't Close that Connections After Putting Data2019 Community Moderator ElectionHTTP POST in Flash - TCP connection closed by client before responseOutOfMemoryError with elasticsearch REST Java client via apache http nioHow to catch bulk response with bulk processor?(Java High level rest client)ElasticSearch 6 High Level Rest Client preparePutMappingAdd authentication in elasticsearch high level client for JAVAElasticSearch Java HighLevelRestClient Connection RefusedElasticsearch Java high level client closing connectionsElastic Search Java Client : Invocation of init method failedNot able to create index using Java high level Rest clientSpringBoot - elasticsearch bulkrequest - synchronization of add&flush controller
Unfamiliar notation in Diabelli's "Duet in D" for piano
Why restrict private health insurance?
What is the oldest European royal house?
What would be the most expensive material to an intergalactic society?
I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?
3.5% Interest Student Loan or use all of my savings on Tuition?
Boss Telling direct supervisor I snitched
Is there a math expression equivalent to the conditional ternary operator?
Insult for someone who "doesn't know anything"
Should I apply for my boss's promotion?
Does the US political system, in principle, allow for a no-party system?
Do I need a return ticket to Canada if I'm a Japanese National?
ESPP--any reason not to go all in?
I am the person who abides by rules but breaks the rules . Who am I
A vote on the Brexit backstop
Was it really inappropriate to write a pull request for the company I interviewed with?
Exempt portion of equation line from aligning?
School performs periodic password audits. Is my password compromised?
Ultrafilters as a double dual
Inorganic chemistry handbook with reaction lists
Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?
Help! My Character is too much for her story!
Tabular environment - text vertically positions itself by bottom of tikz picture in adjacent cell
Should we avoid writing fiction about historical events without extensive research?
Elasticsearch Java High Level REST Client Establish A Bunch of TCP Connection and Don't Close that Connections After Putting Data
2019 Community Moderator ElectionHTTP POST in Flash - TCP connection closed by client before responseOutOfMemoryError with elasticsearch REST Java client via apache http nioHow to catch bulk response with bulk processor?(Java High level rest client)ElasticSearch 6 High Level Rest Client preparePutMappingAdd authentication in elasticsearch high level client for JAVAElasticSearch Java HighLevelRestClient Connection RefusedElasticsearch Java high level client closing connectionsElastic Search Java Client : Invocation of init method failedNot able to create index using Java high level Rest clientSpringBoot - elasticsearch bulkrequest - synchronization of add&flush controller
I have a periodic job that has been run every second (this is configurable).
In this job, I first create a connection to Elasticsearch server:
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Then I check for the existence of a special index called test
. If it doesn't exist, I create it first.
GetIndexRequest indexRequest = new GetIndexRequest();
indexRequest.indices("test");
boolean testIndexIsExists = false;
try
testIndexIsExists = client.indices().exists(indexRequest, RequestOptions.DEFAULT);
catch (IOException ioe)
logger.error("Can't check the existence of test index in Elasticsearch!");
if(testIndexIsExists)
// bulk request...
else
CreateIndexRequest testIndex = new CreateIndexRequest("test");
try
XContentBuilder mappingConfiguration = buildMappingConfiguration();
testIndex.mapping("doc", mappingConfiguration);
client.indices().create(testIndex, RequestOptions.DEFAULT);
// bulk request...
catch (IOException ioe)
logger.error("Can't create test index in Elasticsearch");
And after doing a bulk request that has near 2000 document, I close the connection in this job:
client.close();
Java High Level REST Client version:
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.4.0</version>
</dependency>
My problem is a bunch of TCP connection that has been established and not been closed. These TCP connections occupy all operating system TCP connections over time.
On the other hand, I'm a bit confused. Should RestHighLevelClient
instance be singleton object for the entire application or I must create a new instance in every job running cycle and close the instance after doing that job?
java elasticsearch
This question has an open bounty worth +50
reputation from Saeed Hassanvand ending ending at 2019-03-13 13:06:35Z">in 4 days.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
|
show 2 more comments
I have a periodic job that has been run every second (this is configurable).
In this job, I first create a connection to Elasticsearch server:
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Then I check for the existence of a special index called test
. If it doesn't exist, I create it first.
GetIndexRequest indexRequest = new GetIndexRequest();
indexRequest.indices("test");
boolean testIndexIsExists = false;
try
testIndexIsExists = client.indices().exists(indexRequest, RequestOptions.DEFAULT);
catch (IOException ioe)
logger.error("Can't check the existence of test index in Elasticsearch!");
if(testIndexIsExists)
// bulk request...
else
CreateIndexRequest testIndex = new CreateIndexRequest("test");
try
XContentBuilder mappingConfiguration = buildMappingConfiguration();
testIndex.mapping("doc", mappingConfiguration);
client.indices().create(testIndex, RequestOptions.DEFAULT);
// bulk request...
catch (IOException ioe)
logger.error("Can't create test index in Elasticsearch");
And after doing a bulk request that has near 2000 document, I close the connection in this job:
client.close();
Java High Level REST Client version:
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.4.0</version>
</dependency>
My problem is a bunch of TCP connection that has been established and not been closed. These TCP connections occupy all operating system TCP connections over time.
On the other hand, I'm a bit confused. Should RestHighLevelClient
instance be singleton object for the entire application or I must create a new instance in every job running cycle and close the instance after doing that job?
java elasticsearch
This question has an open bounty worth +50
reputation from Saeed Hassanvand ending ending at 2019-03-13 13:06:35Z">in 4 days.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
Are you using more than one client instance at a time in your application? Because you should be using only one and use that one the whole time. Thenclose
when your app exits. It should handle everything else on it's own.
– mumpitz
Feb 18 at 12:10
What is the exact version of elastic and client you are using?
– frant.hartm
2 days ago
Elasticsearch: 6.6.1, Java High Level REST Client: 6.4.0
– Saeed Hassanvand
2 days ago
Why not keep the client instance around instead of creating new every time?
– theMayer
2 days ago
Do the connections clear up after the application is terminated?
– Mike
2 days ago
|
show 2 more comments
I have a periodic job that has been run every second (this is configurable).
In this job, I first create a connection to Elasticsearch server:
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Then I check for the existence of a special index called test
. If it doesn't exist, I create it first.
GetIndexRequest indexRequest = new GetIndexRequest();
indexRequest.indices("test");
boolean testIndexIsExists = false;
try
testIndexIsExists = client.indices().exists(indexRequest, RequestOptions.DEFAULT);
catch (IOException ioe)
logger.error("Can't check the existence of test index in Elasticsearch!");
if(testIndexIsExists)
// bulk request...
else
CreateIndexRequest testIndex = new CreateIndexRequest("test");
try
XContentBuilder mappingConfiguration = buildMappingConfiguration();
testIndex.mapping("doc", mappingConfiguration);
client.indices().create(testIndex, RequestOptions.DEFAULT);
// bulk request...
catch (IOException ioe)
logger.error("Can't create test index in Elasticsearch");
And after doing a bulk request that has near 2000 document, I close the connection in this job:
client.close();
Java High Level REST Client version:
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.4.0</version>
</dependency>
My problem is a bunch of TCP connection that has been established and not been closed. These TCP connections occupy all operating system TCP connections over time.
On the other hand, I'm a bit confused. Should RestHighLevelClient
instance be singleton object for the entire application or I must create a new instance in every job running cycle and close the instance after doing that job?
java elasticsearch
I have a periodic job that has been run every second (this is configurable).
In this job, I first create a connection to Elasticsearch server:
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Then I check for the existence of a special index called test
. If it doesn't exist, I create it first.
GetIndexRequest indexRequest = new GetIndexRequest();
indexRequest.indices("test");
boolean testIndexIsExists = false;
try
testIndexIsExists = client.indices().exists(indexRequest, RequestOptions.DEFAULT);
catch (IOException ioe)
logger.error("Can't check the existence of test index in Elasticsearch!");
if(testIndexIsExists)
// bulk request...
else
CreateIndexRequest testIndex = new CreateIndexRequest("test");
try
XContentBuilder mappingConfiguration = buildMappingConfiguration();
testIndex.mapping("doc", mappingConfiguration);
client.indices().create(testIndex, RequestOptions.DEFAULT);
// bulk request...
catch (IOException ioe)
logger.error("Can't create test index in Elasticsearch");
And after doing a bulk request that has near 2000 document, I close the connection in this job:
client.close();
Java High Level REST Client version:
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.4.0</version>
</dependency>
My problem is a bunch of TCP connection that has been established and not been closed. These TCP connections occupy all operating system TCP connections over time.
On the other hand, I'm a bit confused. Should RestHighLevelClient
instance be singleton object for the entire application or I must create a new instance in every job running cycle and close the instance after doing that job?
java elasticsearch
java elasticsearch
edited 2 days ago
Saeed Hassanvand
asked Feb 18 at 11:58
Saeed HassanvandSaeed Hassanvand
135
135
This question has an open bounty worth +50
reputation from Saeed Hassanvand ending ending at 2019-03-13 13:06:35Z">in 4 days.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
This question has an open bounty worth +50
reputation from Saeed Hassanvand ending ending at 2019-03-13 13:06:35Z">in 4 days.
The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.
Are you using more than one client instance at a time in your application? Because you should be using only one and use that one the whole time. Thenclose
when your app exits. It should handle everything else on it's own.
– mumpitz
Feb 18 at 12:10
What is the exact version of elastic and client you are using?
– frant.hartm
2 days ago
Elasticsearch: 6.6.1, Java High Level REST Client: 6.4.0
– Saeed Hassanvand
2 days ago
Why not keep the client instance around instead of creating new every time?
– theMayer
2 days ago
Do the connections clear up after the application is terminated?
– Mike
2 days ago
|
show 2 more comments
Are you using more than one client instance at a time in your application? Because you should be using only one and use that one the whole time. Thenclose
when your app exits. It should handle everything else on it's own.
– mumpitz
Feb 18 at 12:10
What is the exact version of elastic and client you are using?
– frant.hartm
2 days ago
Elasticsearch: 6.6.1, Java High Level REST Client: 6.4.0
– Saeed Hassanvand
2 days ago
Why not keep the client instance around instead of creating new every time?
– theMayer
2 days ago
Do the connections clear up after the application is terminated?
– Mike
2 days ago
Are you using more than one client instance at a time in your application? Because you should be using only one and use that one the whole time. Then
close
when your app exits. It should handle everything else on it's own.– mumpitz
Feb 18 at 12:10
Are you using more than one client instance at a time in your application? Because you should be using only one and use that one the whole time. Then
close
when your app exits. It should handle everything else on it's own.– mumpitz
Feb 18 at 12:10
What is the exact version of elastic and client you are using?
– frant.hartm
2 days ago
What is the exact version of elastic and client you are using?
– frant.hartm
2 days ago
Elasticsearch: 6.6.1, Java High Level REST Client: 6.4.0
– Saeed Hassanvand
2 days ago
Elasticsearch: 6.6.1, Java High Level REST Client: 6.4.0
– Saeed Hassanvand
2 days ago
Why not keep the client instance around instead of creating new every time?
– theMayer
2 days ago
Why not keep the client instance around instead of creating new every time?
– theMayer
2 days ago
Do the connections clear up after the application is terminated?
– Mike
2 days ago
Do the connections clear up after the application is terminated?
– Mike
2 days ago
|
show 2 more comments
2 Answers
2
active
oldest
votes
The high level client is already maintaining a connection pool for you, so I would use it as a singleton. Constantly creating and closing connection pools is expensive, and the client and underlying HTTP connection pool are thread safe. Also, calling close()
on the client just delegates to the Apache HTTP client shutdown()
method, so you're at the mercy of how they handle cleanup and releasing resources.
If you're using Spring or some other DI framework, it's easy to create a singleton instance of the client that can be injected as needed. And you can add the call to client.close()
as part of the bean shutdown/destroy lifecycle phase.
Quick example using Spring Boot:
@Configuration
@ConditionalOnClass(RestHighLevelClient.class)
public class ElasticSearchConfiguration
@Value("$elasticsearch.address")
String address;
@Value("$elasticsearch.port")
int port;
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient()
return new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Note: In this case Spring will automatically detect that the bean has a close
method and call it for you when the bean is destroyed. Other frameworks may require you to specify how shutdown should be handled.
add a comment |
RestHighLevelClient
should generally be singleton, unless you have a good reason. For example if your job is running every hour and not a minute it might make sense to create new instance and close it after the job.
If you are sure you are calling the close()
in all cases (e.g. you haven't missed any exceptions) then my next guess is bug in the elastic client.
It look like they are forgetting to consume the response in the exists call:
https://github.com/elastic/elasticsearch/blob/v6.4.0/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java#L1419
Are you able to test without the exists
call?
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54746822%2felasticsearch-java-high-level-rest-client-establish-a-bunch-of-tcp-connection-an%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The high level client is already maintaining a connection pool for you, so I would use it as a singleton. Constantly creating and closing connection pools is expensive, and the client and underlying HTTP connection pool are thread safe. Also, calling close()
on the client just delegates to the Apache HTTP client shutdown()
method, so you're at the mercy of how they handle cleanup and releasing resources.
If you're using Spring or some other DI framework, it's easy to create a singleton instance of the client that can be injected as needed. And you can add the call to client.close()
as part of the bean shutdown/destroy lifecycle phase.
Quick example using Spring Boot:
@Configuration
@ConditionalOnClass(RestHighLevelClient.class)
public class ElasticSearchConfiguration
@Value("$elasticsearch.address")
String address;
@Value("$elasticsearch.port")
int port;
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient()
return new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Note: In this case Spring will automatically detect that the bean has a close
method and call it for you when the bean is destroyed. Other frameworks may require you to specify how shutdown should be handled.
add a comment |
The high level client is already maintaining a connection pool for you, so I would use it as a singleton. Constantly creating and closing connection pools is expensive, and the client and underlying HTTP connection pool are thread safe. Also, calling close()
on the client just delegates to the Apache HTTP client shutdown()
method, so you're at the mercy of how they handle cleanup and releasing resources.
If you're using Spring or some other DI framework, it's easy to create a singleton instance of the client that can be injected as needed. And you can add the call to client.close()
as part of the bean shutdown/destroy lifecycle phase.
Quick example using Spring Boot:
@Configuration
@ConditionalOnClass(RestHighLevelClient.class)
public class ElasticSearchConfiguration
@Value("$elasticsearch.address")
String address;
@Value("$elasticsearch.port")
int port;
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient()
return new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Note: In this case Spring will automatically detect that the bean has a close
method and call it for you when the bean is destroyed. Other frameworks may require you to specify how shutdown should be handled.
add a comment |
The high level client is already maintaining a connection pool for you, so I would use it as a singleton. Constantly creating and closing connection pools is expensive, and the client and underlying HTTP connection pool are thread safe. Also, calling close()
on the client just delegates to the Apache HTTP client shutdown()
method, so you're at the mercy of how they handle cleanup and releasing resources.
If you're using Spring or some other DI framework, it's easy to create a singleton instance of the client that can be injected as needed. And you can add the call to client.close()
as part of the bean shutdown/destroy lifecycle phase.
Quick example using Spring Boot:
@Configuration
@ConditionalOnClass(RestHighLevelClient.class)
public class ElasticSearchConfiguration
@Value("$elasticsearch.address")
String address;
@Value("$elasticsearch.port")
int port;
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient()
return new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Note: In this case Spring will automatically detect that the bean has a close
method and call it for you when the bean is destroyed. Other frameworks may require you to specify how shutdown should be handled.
The high level client is already maintaining a connection pool for you, so I would use it as a singleton. Constantly creating and closing connection pools is expensive, and the client and underlying HTTP connection pool are thread safe. Also, calling close()
on the client just delegates to the Apache HTTP client shutdown()
method, so you're at the mercy of how they handle cleanup and releasing resources.
If you're using Spring or some other DI framework, it's easy to create a singleton instance of the client that can be injected as needed. And you can add the call to client.close()
as part of the bean shutdown/destroy lifecycle phase.
Quick example using Spring Boot:
@Configuration
@ConditionalOnClass(RestHighLevelClient.class)
public class ElasticSearchConfiguration
@Value("$elasticsearch.address")
String address;
@Value("$elasticsearch.port")
int port;
@Bean(destroyMethod = "close")
public RestHighLevelClient restHighLevelClient()
return new RestHighLevelClient(
RestClient.builder(new HttpHost(address, port, "http")));
Note: In this case Spring will automatically detect that the bean has a close
method and call it for you when the bean is destroyed. Other frameworks may require you to specify how shutdown should be handled.
answered 2 days ago
MikeMike
1,458819
1,458819
add a comment |
add a comment |
RestHighLevelClient
should generally be singleton, unless you have a good reason. For example if your job is running every hour and not a minute it might make sense to create new instance and close it after the job.
If you are sure you are calling the close()
in all cases (e.g. you haven't missed any exceptions) then my next guess is bug in the elastic client.
It look like they are forgetting to consume the response in the exists call:
https://github.com/elastic/elasticsearch/blob/v6.4.0/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java#L1419
Are you able to test without the exists
call?
add a comment |
RestHighLevelClient
should generally be singleton, unless you have a good reason. For example if your job is running every hour and not a minute it might make sense to create new instance and close it after the job.
If you are sure you are calling the close()
in all cases (e.g. you haven't missed any exceptions) then my next guess is bug in the elastic client.
It look like they are forgetting to consume the response in the exists call:
https://github.com/elastic/elasticsearch/blob/v6.4.0/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java#L1419
Are you able to test without the exists
call?
add a comment |
RestHighLevelClient
should generally be singleton, unless you have a good reason. For example if your job is running every hour and not a minute it might make sense to create new instance and close it after the job.
If you are sure you are calling the close()
in all cases (e.g. you haven't missed any exceptions) then my next guess is bug in the elastic client.
It look like they are forgetting to consume the response in the exists call:
https://github.com/elastic/elasticsearch/blob/v6.4.0/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java#L1419
Are you able to test without the exists
call?
RestHighLevelClient
should generally be singleton, unless you have a good reason. For example if your job is running every hour and not a minute it might make sense to create new instance and close it after the job.
If you are sure you are calling the close()
in all cases (e.g. you haven't missed any exceptions) then my next guess is bug in the elastic client.
It look like they are forgetting to consume the response in the exists call:
https://github.com/elastic/elasticsearch/blob/v6.4.0/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java#L1419
Are you able to test without the exists
call?
answered 2 days ago
frant.hartmfrant.hartm
9,82912648
9,82912648
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54746822%2felasticsearch-java-high-level-rest-client-establish-a-bunch-of-tcp-connection-an%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you using more than one client instance at a time in your application? Because you should be using only one and use that one the whole time. Then
close
when your app exits. It should handle everything else on it's own.– mumpitz
Feb 18 at 12:10
What is the exact version of elastic and client you are using?
– frant.hartm
2 days ago
Elasticsearch: 6.6.1, Java High Level REST Client: 6.4.0
– Saeed Hassanvand
2 days ago
Why not keep the client instance around instead of creating new every time?
– theMayer
2 days ago
Do the connections clear up after the application is terminated?
– Mike
2 days ago