{
  "id": "nginx/proxy-read-timeout-streaming",
  "signature": "upstream timed out (110: Connection timed out) while reading upstream, client: 10.0.0.1, server: stream.example.com",
  "signature_zh": "读取上游时上游超时（110：连接超时），客户端：10.0.0.1，服务器：stream.example.com",
  "regex": "upstream timed out \\(110: Connection timed out\\) while reading upstream",
  "domain": "nginx",
  "category": "timeout_error",
  "subcategory": null,
  "root_cause": "proxy_read_timeout is too short for streaming or long-polling responses, causing nginx to close the connection before the upstream finishes sending data.",
  "root_cause_type": "generic",
  "root_cause_zh": "proxy_read_timeout 对流式或长轮询响应设置过短，导致 nginx 在上游完成发送数据前关闭连接。",
  "versions": [
    {
      "version": "nginx/1.18.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx/1.20.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx/1.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx/1.26.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "proxy_connect_timeout controls the initial handshake, not the data transfer phase; the timeout occurs during reading, not connecting.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Keepalive affects connection reuse, not the per-request timeout for reading response data.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Infinite timeout can accumulate zombie connections, eventually exhausting worker connections or memory.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase proxy_read_timeout to 300s (or higher) in the location or server block: `location /stream { proxy_read_timeout 300s; ... }`",
      "success_rate": 0.9,
      "how": "Increase proxy_read_timeout to 300s (or higher) in the location or server block: `location /stream { proxy_read_timeout 300s; ... }`",
      "condition": "",
      "sources": []
    },
    {
      "action": "For streaming endpoints, add a send_timeout directive to avoid client-side timeouts: `send_timeout 300s;`",
      "success_rate": 0.8,
      "how": "For streaming endpoints, add a send_timeout directive to avoid client-side timeouts: `send_timeout 300s;`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement keepalive on upstream to reduce connection overhead: `upstream backend { server 127.0.0.1:8080; keepalive 32; }` and `proxy_http_version 1.1; proxy_set_header Connection '';`",
      "success_rate": 0.75,
      "how": "Implement keepalive on upstream to reduce connection overhead: `upstream backend { server 127.0.0.1:8080; keepalive 32; }` and `proxy_http_version 1.1; proxy_set_header Connection '';`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在 location 或 server 块中将 proxy_read_timeout 增加到 300 秒（或更高）：`location /stream { proxy_read_timeout 300s; ... }`",
    "对于流式端点，添加 send_timeout 指令以避免客户端超时：`send_timeout 300s;`",
    "在上游实现 keepalive 以减少连接开销：`upstream backend { server 127.0.0.1:8080; keepalive 32; }` 和 `proxy_http_version 1.1; proxy_set_header Connection '';`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout",
  "official_doc_section": null,
  "error_code": "110",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-03-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}