{
  "id": "go/grpc-data-loss-stream-reset",
  "signature": "rpc error: code = DataLoss desc = stream terminated by RST_STREAM with error code: INTERNAL_ERROR",
  "signature_zh": "rpc 错误：code = DataLoss，desc = 流被 RST_STREAM 终止，错误码：INTERNAL_ERROR",
  "regex": "rpc\\ error:\\ code\\ =\\ DataLoss\\ desc\\ =\\ stream\\ terminated\\ by\\ RST_STREAM\\ with\\ error\\ code:\\ INTERNAL_ERROR",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The HTTP/2 stream was reset by the peer, often due to a proxy (Envoy/nginx) killing long-lived streams or a server bug.",
  "root_cause_type": "generic",
  "root_cause_zh": "HTTP/2 流被对端重置，通常由于代理（Envoy/nginx）终止长连接流或服务端 bug。",
  "versions": [
    {
      "version": "google.golang.org/grpc 1.52+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "RST_STREAM is a peer-initiated reset, not a timeout; a longer deadline won't stop it.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Reconnect storms against a misbehaving proxy worsen the outage.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Align proxy timeouts with gRPC keepalive:\n// Envoy\nstream_idle_timeout: 0s\n// client\ngrpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 30*time.Second, Timeout: 10*time.Second})",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Implement stream reconnection with jittered exponential backoff and resume from the last received cursor (application-level checkpointing).",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-11-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}