解决频繁出现504网关反映迟钝的问题

在网关配置文件中加上:

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

猜你喜欢

转载自blog.csdn.net/weixin_38708854/article/details/106293244