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 were defined too low. Also, the Hystrix -Mechanism 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 To raise the timeout values to more graceful values and deactivate the Hystrix -Mechanism you have to do the followingmechanism, follow these steps:
- 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 suggested values were determined by best - guess and trial - and - error and should only be treated seen as a recommendation. It may be necessary to adapt them to the your local situation/needs.
Add the following line:
feign.hystrix.enabled:
false
- Start Restart the service-manager service again. The timeouts are now raised.
...
If you are implementing a custom microservice make , 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 elasticsearchfor Elasticsearch to answer, add or modify the following line in the <service-manager>\config\application-es.yml file:
|