{
  "id": "go/grpc-internal-transport-closing",
  "signature": "rpc error: code = Internal desc = transport: transport is closing",
  "signature_zh": "rpc 错误：code = Internal desc = transport: 传输正在关闭",
  "regex": "rpc\\ error:\\ code\\ =\\ Internal\\ desc\\ =\\ transport:\\ transport\\ is\\ closing",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The underlying HTTP/2 transport was closed while an RPC was in flight. Causes include server shutdown, keepalive timeout, or a proxy (e.g., Envoy) closing idle connections.",
  "root_cause_type": "generic",
  "root_cause_zh": "RPC 进行中时底层 HTTP/2 传输被关闭。原因包括服务端关闭、keepalive 超时，或代理（如 Envoy）关闭空闲连接。",
  "versions": [
    {
      "version": "google.golang.org/grpc 1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The response body is empty; downstream code will fail parsing nil/empty data.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "WithBlock only affects initial dial; it does not prevent mid-call transport closure.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "conn, _ := grpc.Dial(addr,\n    grpc.WithKeepaliveParams(keepalive.ClientParameters{\n        Time:                30 * time.Second,\n        Timeout:             10 * time.Second,\n        PermitWithoutStream: true,\n    }),\n)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "for {\n    resp, err := client.Get(ctx, req)\n    if err == nil { return resp, nil }\n    c := status.Code(err)\n    if c != codes.Internal && c != codes.Unavailable { return nil, err }\n    time.Sleep(backoff.NextBackOff())\n}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-09-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}