For systems under heavy load the timeout values of the service-manager that define how long to wait for a connection keep-alive or request answer are chosen too low. Also the Hystrix-Mechanism that takes the entire microservice out of business when it seems to be overloaded (i.e. it is not answering within the timeouts) does not help if there is only one instance of the microservice overall. In order to raise the timeout values to more graceful values and deactivate the Hystrix-Mechanism you have to do the following:
- Stop the service-manager service
- Edit the file <service-manager>\config\application-prod.yml
Change the values of the following lines to the ones shown below
service:
connection-timeout-ms:
60000
socket-timeout-ms:
300000
Important note: The given values were determined by best-guess and trial-and-error and should only be treated as a recommendation. It may be necessary to adapt them to the local situation / needs.
Add the following line:
feign.hystrix.enabled:
false
- Start the service-manager service again. The timeouts are now raised.
If you are implementing a custom microservice make sure that your custom service's application.yml contains the following lines and inherits the prod-profile.
|
If services are going down because of timeouts waiting for elasticsearch to answer, add or modify the following line in the <service-manager>\config\application-es.yml file:
|