{
  "id": "nginx/ssl-handshake-timeout-upstream",
  "signature": "SSL handshake timeout while connecting to upstream",
  "signature_zh": "与上游服务器SSL握手超时",
  "regex": "SSL_do_handshake\\(\\) failed \\(SSL: error:.*?:SSL routines:ssl3_read_bytes:ssl handshake timeout\\) while SSL handshaking to upstream",
  "domain": "nginx",
  "category": "timeout_error",
  "subcategory": null,
  "root_cause": "Upstream server is slow to complete the SSL handshake, often due to high load or network latency.",
  "root_cause_type": "generic",
  "root_cause_zh": "上游服务器完成SSL握手过程缓慢，通常由高负载或网络延迟引起。",
  "versions": [
    {
      "version": "nginx 1.18.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx 1.20.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx 1.22.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase proxy_read_timeout",
      "why_fails": "proxy_read_timeout controls reading response body, not SSL handshake timeout.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable SSL verification entirely",
      "why_fails": "This removes security without addressing the root cause (slow handshake).",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Restart nginx service",
      "why_fails": "Restarting nginx does not affect upstream SSL handshake speed.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase proxy_ssl_handshake_timeout in the location block:\nproxy_ssl_handshake_timeout 30s;",
      "success_rate": 0.85,
      "how": "Increase proxy_ssl_handshake_timeout in the location block:\nproxy_ssl_handshake_timeout 30s;",
      "condition": "",
      "sources": []
    },
    {
      "action": "Optimize upstream SSL configuration: enable session caching and reduce cipher negotiation overhead:\nproxy_ssl_session_reuse on;\nproxy_ssl_ciphers HIGH:!aNULL:!MD5;",
      "success_rate": 0.75,
      "how": "Optimize upstream SSL configuration: enable session caching and reduce cipher negotiation overhead:\nproxy_ssl_session_reuse on;\nproxy_ssl_ciphers HIGH:!aNULL:!MD5;",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在location块中增加proxy_ssl_handshake_timeout：\nproxy_ssl_handshake_timeout 30s;",
    "优化上游SSL配置：启用会话缓存并减少密码协商开销：\nproxy_ssl_session_reuse on;\nproxy_ssl_ciphers HIGH:!aNULL:!MD5;"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ssl_handshake_timeout",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}