How to set custom Feign client connection timeout?

I solved my problem using this answer on question: Hystrix command fails with “timed-out and no fallback available”.

I added hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=4000 to my application.properties to set custom timeout.


You can be configured timeout using configuration properties on application.yaml file:

feign:
  client:
    config:
      default:
        connectTimeout: 5000
        readTimeout: 5000

Notice that this will change your default feign configuration, if you want to update the timeouts just for your client replace default with the name configured in @FeignClient in your case it will be client, another thing is that you must specify both connectTimeout and readTimeout for this to take effect.

For more detail see this: documentation