赞
踩
问题描述:
我们在走ingress的java程序的时候,往往会有导出数据的功能,这个时候就会有因网络慢、后台处理时间过长导致下载超时,也有因下载文件太大,导致下载失败,综合解决办法如下
编辑ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/fastcgi-buffer-size: 128k
nginx.ingress.kubernetes.io/fastcgi-buffers: 4 128k
nginx.ingress.kubernetes.io/fastcgi-busy-buffers-size: 256k
nginx.ingress.kubernetes.io/fastcgi-temp-file-write-size: 256k
nginx.ingress.kubernetes.io/proxy-buffering: 'on'
nginx.ingress.kubernetes.io/proxy-connect-timeout: '600'
nginx.ingress.kubernetes.io/proxy-read-timeout: '600'
nginx.ingress.kubernetes.io/proxy-send-timeout: '600'
其中
1)更改反向代理超时时间
nginx.ingress.kubernetes.io/proxy-buffering: 'on'
nginx.ingress.kubernetes.io/proxy-connect-timeout: '600'
nginx.ingress.kubernetes.io/proxy-read-timeout: '600'
nginx.ingress.kubernetes.io/proxy-send-timeout: '600'
2)更改缓存大小
nginx.ingress.kubernetes.io/fastcgi-buffer-size: 128k
nginx.ingress.kubernetes.io/fastcgi-buffers: 4 128k
nginx.ingress.kubernetes.io/fastcgi-busy-buffers-size: 256k
nginx.ingress.kubernetes.io/fastcgi-temp-file-write-size: 256k
nginx.ingress.kubernetes.io/proxy-buffering: 'on'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。