Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

  1. Stop the service-manager service.
  2. Edit the file <service-manager>\config\application-prod.yml.
  3. 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.

  4. Add the following line: 

    feign.hystrix.enabled: false


  5. 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.

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: ${service.socket-timeout-ms:300000}
ribbon.ReadTimeout: ${service.socket-timeout-ms:300000}
ribbon.ConnectTimeout: ${service.connection-timeout-ms:60000}


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:

management.health.elasticsearch.response-timeout: 30000