# Question with RestClientBuilder's default setting

**URL:** <https://discuss.elastic.co/t/question-with-restclientbuilders-default-setting/287528>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [October 25, 2021, 3:43am UTC](https://discuss.elastic.co/t/question-with-restclientbuilders-default-setting/287528 "2021-10-25T03:43:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![finishne](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/finishne/32/96301_2.png) [@finishne](https://discuss.elastic.co/u/finishne)\
**Post date:** [October 25, 2021, 3:43am UTC](https://discuss.elastic.co/t/question-with-restclientbuilders-default-setting/287528/1 "2021-10-25T03:43:27Z")

</div>

Recently I ran into a problem. When accessing cluster at 2000qps, the service caused the local connection timeout due to the index warm-up. However, these connections created by the AsynHttpClient of RestHighLevelClient cannot be released as i wish. I think this requires setting RequestConfig.socketTimeout, maxConnPerRoute. But these parameters have been set to fixed values ​​(RestClientBuilder.DEFAULT\_SOCKET\_TIMEOUT\_MILLIS,RestClientBuilder.DEFAULT\_MAX\_CONN\_PER\_ROUTE) in RestClientBuilder and cannot be modified. What is the original intention of this, or do I have other ways to solve the problem?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 22, 2021, 3:43am UTC](https://discuss.elastic.co/t/question-with-restclientbuilders-default-setting/287528/2 "2021-11-22T03:43:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
