解決頻繁出現504網關反映遲鈍的問題

在網關配置文件中加上:

#防止請求超時
ribbon:
  ReadTimeout: 5000
  ConnectTimeout: 5000
  MaxAutoRetries: 0
  MaxAutoRetriesNextServer: 1
  eureka:
    enabled: true
hystrix:
  command:
    default:
      excution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 60000

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章