素材巴巴 > 程序开发 >

Ingress 响应超时504故障排除

程序开发 2023-09-15 07:44:39

Ingress 响应超时504故障排除

1. 故障现象:

在阿里云的ACK新上了一套系统.该系统有个将查询结果导出为excle并下载的功能,当第一次下载时等待1分钟后就跳出504,点击返回后再次下载可以正常下载.
在这里插入图片描述

2. 分析判断

  1. 根据504的页面应该是和Ingress配置相关
  2. 和超时时间长短有关

3. 排除过程

编辑Ingress

kubectl edit ingress/ehelp-ingress -n crm-web
 

在annotations下追加3行配置

    nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
 

具体如下:

apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:annotations:kubectl.kubernetes.io/last-applied-configuration: |{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{},"name":"crm-web-ingress","namespace":"crm-web"},"spec":{"rules":[{"host":"crm-web.mircosoft.com","http":{"paths":[{"backend":{"service":{"name":"crm-web","port":{"number":8080}}},"path":"/","pathType":"Prefix"}]}}]}}nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"...略
 

按esc : x保存退出后,故障排除.


标签:

素材巴巴 Copyright © 2013-2021 http://www.sucaibaba.com/. Some Rights Reserved. 备案号:备案中。