您的位置:首页 >Nginx配置proxy_send_timeout后端超时解决
发布于2026-04-12 阅读(0)
扫一扫,手机访问
proxy_send_timeout 控制 Nginx 向后端服务器发送请求体时的超时,即 Nginx 主动向 upstream 发送数据过程中等待后端 TCP 接收缓冲区空闲的时间,不涉及响应读取。

proxy_send_timeout 是 Nginx 在 http、server 或 location 块中用于控制**Nginx 向后端服务器发送请求体(request body)时的超时时间**,不是控制后端响应的超时。
这个指令只影响 Nginx 主动向 upstream(如 FastCGI、proxy_pass 目标)发送数据的过程,典型场景包括:
注意:它不控制 Nginx 等待后端返回响应头或响应体的耗时(那是 proxy_read_timeout 的职责)。
可以在 http、server、location 任意层级设置,低层级会覆盖高层级。例如:
http {
proxy_send_timeout 30; # 默认是 60 秒
server {
location /upload/ {
proxy_pass http://backend;
proxy_send_timeout 120; # 此处上传接口放宽到 120 秒
}
}
}
504 Gateway Time-out,错误日志里通常出现 upstream timed out (110: Connection timed out) while sending request to upstreamfastcgi_send_timeout,它作用类似但针对 FastCGI 协议层
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
正版软件
1
2
3
7
9