{
  "id": "grpc/header-too-large",
  "signature": "INTERNAL: grpc: header size exceeds max limit of 8192 bytes",
  "signature_zh": "内部错误：gRPC 标头大小超过 8192 字节的最大限制",
  "regex": "header size exceeds max limit of \\d+ bytes",
  "domain": "grpc",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "gRPC metadata (headers) sent in a single RPC call exceeds the default 8KB limit enforced by the gRPC framework.",
  "root_cause_type": "generic",
  "root_cause_zh": "单个 RPC 调用中发送的 gRPC 元数据（标头）超过了 gRPC 框架强制执行的默认 8KB 限制。",
  "versions": [
    {
      "version": "gRPC v1.61.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.58.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.55.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "C++ gRPC v1.50.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing server-side max header size only",
      "why_fails": "The limit is enforced on both client and server; both sides must agree.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Compressing metadata using gRPC compression",
      "why_fails": "Metadata is not compressed by gRPC compression; only message payload is.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Sending metadata in the message body instead",
      "why_fails": "Metadata is designed for headers; moving it to body breaks protocol semantics.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the max header size on both client and server via channel option: `grpc.max_metadata_size=16384` in Python, or `GRPC_ARG_MAX_METADATA_SIZE` in C++.",
      "success_rate": 0.85,
      "how": "Increase the max header size on both client and server via channel option: `grpc.max_metadata_size=16384` in Python, or `GRPC_ARG_MAX_METADATA_SIZE` in C++.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce metadata size by splitting large metadata across multiple RPCs or using a separate side channel for large data.",
      "success_rate": 0.75,
      "how": "Reduce metadata size by splitting large metadata across multiple RPCs or using a separate side channel for large data.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在客户端和服务器上通过通道选项增加最大标头大小：Python 中使用 `grpc.max_metadata_size=16384`，C++ 中使用 `GRPC_ARG_MAX_METADATA_SIZE`。",
    "通过将大型元数据拆分到多个 RPC 或使用单独的侧通道传输大型数据来减少元数据大小。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/error-handling/#header-size-limit",
  "official_doc_section": null,
  "error_code": "EHDRSZ",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}