Ingress 响应超时504故障排除

Ingress 响应超时504故障排除

1. 故障现象:

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

2. 分析判断

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

3. 排除过程

编辑Ingress

bash 复制代码
kubectl edit ingress/ehelp-ingress -n crm-web

在annotations下追加3行配置

yaml 复制代码
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"

具体如下:

yaml 复制代码
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保存退出后,故障排除.

相关推荐
霖.2410 天前
四种常用SVC(service)及其与Ingress协作方式
linux·服务器·云原生·kubernetes·k8s
博客园团队14 天前
博客园出海记-K8S集群优化:一次命中注定的失败
k8s·出海记
小马过河R14 天前
K8s引入Service Mesh原因及Istio入门
云原生·容器·kubernetes·k8s·istio·service_mesh
Gogo81615 天前
k8s 跟 nacos 关于服务注册以及服务发现
java·nacos·k8s
@ chen1 个月前
kubectl常用命令
云原生·kubernetes·k8s
博客园团队1 个月前
博客园出海记-组装集装箱:自建 Kubernetes 集群
k8s·出海记
虚伪的空想家1 个月前
K8S的dashboard部署与访问
云原生·容器·kubernetes·k8s·web·dashboard
一个向上的运维者1 个月前
详细解读k8s的kind中service与pod的区别
容器·k8s
感哥1 个月前
Kubernetes Pod
k8s
Elastic 中国社区官方博客1 个月前
使用 cloud-native Elasticsearch 与 ECK 运行
大数据·数据库·elasticsearch·搜索引擎·kubernetes·k8s·全文检索