Read timeout Apache HttpClient | Community
Skip to main content
Uppari_Ramesh
New Participant
July 23, 2024
Solved

Read timeout Apache HttpClient

  • July 23, 2024
  • 1 reply
  • 2308 views

Hi Team, I am currently using 5s as socket timeout in apache http client. I would like to increase this timeout to 10s as my api is taking more than 5s to respond. If we increase timeout would there be any problem in the background? What is the max timeout seconds we can configure for better performance?

 

CloseableHttpClient httpClient = clientBuilderFactory.newBuilder() .setDefaultRequestConfig(RequestConfig.custom().setSocketTimeout(5000).setConnectTimeout(5000).build()) .build(); CloseableHttpResponse response = httpClient.execute(httpGet)

 

Thanks.

 

@aanchalsikka 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
arunpatidarAccepted solution
New Participant
July 23, 2024