spring cloud gateway 超时后在60s以后会自动重试,搞得头大,nacos,ribbon,seata,路由全都配置过了不起作用
后来发现只要不使用代理就不会出现问题
然后修改了nginx
http下
# 设置连接后端服务超时时间(默认为60秒)
proxy_connect_timeout 300;
# 设置从后端服务器读取响应超时时间(默认为60秒)
proxy_send_timeout 300;
# 设置客户端请求超时时间(默认为60秒)
proxy_read_timeout 300;
正常了
k8s设置
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/proxy-connect-timeout: “10”
nginx.ingress.kubernetes.io/proxy-read-timeout: “120”
nginx.ingress.kubernetes.io/proxy-send-timeout: “120”