线上在excel导入时超过1500行就出现问题 IOException: Broken pipe数据量少的时候没问题,本地不可重现
查看日志
看日志,应该是失去客户端连接。应该是导入操作的http请求超时。
因为通过nginx代理到外网,最终对nginx配置如下,问题解决
location /guanli { root html; index index.html index.htm; proxy_set_header Host $host; proxy_set_header X-Real-Ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_send_timeout 1200s; # nginx接收upstream server数据超时, 默认60s, 如果连续的60s内没有收到1个字节, 连接关闭 proxy_read_timeout 1200s; # nginx与upstream server的连接超时时间 proxy_connect_timeout 1200s; # 发送数据至客户端超时, 默认60s, 如果连续的60s内客户端没有收到1个字节, 连接关闭 send_timeout 1200s; proxy_pass http://adminService; }