Describe the bug After the bug (Read timeout from application properties is not used when client is configured ) was fixed in v2.2.4.RELEASE, connect timeout and readtimeout of LoadBalancerFeignClient cannot work when client has any configuration.
Sample When feign client not config, the readtimeout and connecttimeout load by IClientConfig is 1000ms / 1000ms (default, or configed to others ) ( see LoadBalancerFeignClient#L97)
//LoadBalancerFeignClient#L97
IClientConfig getClientConfig(Request.Options options, String clientName) {
IClientConfig requestConfig;
if (options == DEFAULT_OPTIONS) {
requestConfig = this.clientFactory.getClientConfig(clientName);
}
else {
requestConfig = new FeignOptionsClientConfig(options);
}
return requestConfig;
}
and
//FeignClientFactoryBean with bug 323:
if (config.getConnectTimeout() != null && config.getReadTimeout() != null) {
builder.options(new Request.Options(config.getConnectTimeout(),
config.getReadTimeout()));
}
It was worked before bug 323 fixed in FeignClientFactoryBean.java. But now when client has any configuration, readtimeout and connecttimeout (1000ms/1000ms) will be reset to 10000ms and 60000ms. For example, put a Logger leave in properties:
feign.client.config.default.loggerLevel=FULL
Comment From: OlgaMaciaszek
Hello, @izdt 2.2.x is no longer supported. Could you please verify if the issue can be reproduced on a supported version (3.1.4, Spring Cloud dependencies 2021.0.4) and let me know here?
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: izdt
Hello, @izdt
2.2.xis no longer supported. Could you please verify if the issue can be reproduced on a supported version (3.1.4, Spring Cloud dependencies2021.0.4) and let me know here? @OlgaMaciaszek It occurs when useorg.springframework.cloud.openfeign.ribbon.FeignLoadbalancer. Since ribbon has been removed from spring-cloud-openfeign in version 3.x , the bug will not be trigged. I verified version 3.1.4 , this bug does not exist anymore.