connection timeout and read timeout is set as Below.

 public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {
        HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory();

         httpRequestFactory.setConnectTimeout(900000);
        httpRequestFactory.setConnectionRequestTimeout(90000000);

        RestTemplate restTemplate = restTemplateBuilder.build();
        restTemplate.setRequestFactory(httpRequestFactory);
        return restTemplate;
    }

when Service A is calling Service B and Service is sending response after 15 min it's being not received by the service A as IPVS is closing the connection after 15 min. Any Suggestion? Same is not happening if i am using feign client to communicate between Service A and B.

Comment From: bclozel

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

In this case you can consider this as a IPVS question ("how to change the timeout?") or consider retry patterns like resilience4J support.

Comment From: rajkushw27

I have already raise the concern in stack overflow also, let me me explain again, we are setting the httpRequestFactory.setConnectionRequestTimeout(90000000) but still due to ipvs kube proxy load balancer in kubernetes cluster default timeout of tcp connection is closing the connection. restTemplate should be able to keep alive the connection based on configuration.