{
  "id": "go/grpc-keepalive-too-aggressive",
  "signature": "rpc error: code = Unavailable desc = closing transport due to: connection error: desc = \"error reading from server: EOF\", received prior goaway: code: ENHANCE_YOUR_CALM, debug data: \"too_many_pings\"",
  "signature_zh": "rpc 错误：代码 = Unavailable，描述 = 因连接错误关闭传输：从服务端读取时 EOF，收到先前的 GOAWAY：ENHANCE_YOUR_CALM，调试数据：\"too_many_pings\"",
  "regex": "rpc\\ error:\\ code\\ =\\ Unavailable\\ desc\\ =\\ closing\\ transport\\ due\\ to:\\ connection\\ error:\\ desc\\ =\\ \"error\\ reading\\ from\\ server:\\ EOF\",\\ received\\ prior\\ goaway:\\ code:\\ ENHANCE_YOUR_CALM,\\ debug\\ data:\\ \"too_many_pings\"",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The client sends keepalive pings more frequently than the server's MinTime permits, causing the server to send GOAWAY with ENHANCE_YOUR_CALM.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端发送 keepalive ping 的频率超过服务端 MinTime 限制，服务端发送 GOAWAY 并附 ENHANCE_YOUR_CALM。",
  "versions": [
    {
      "version": "1.50+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loses detection of dead connections through idle NAT/LB timeouts, causing silent hangs.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "MaxConnectionAge is a server option; the client's setting is ignored.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Set client keepalive to at least the server's MinTime (default 5 min):\nconn, _ := grpc.NewClient(addr,\n  grpc.WithKeepaliveParams(keepalive.ClientParameters{\n    Time: 5*time.Minute, Timeout: 20*time.Second, PermitWithoutStream: false,\n  }))",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "On the server, lower the enforcement threshold:\nsrv := grpc.NewServer(grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{\n  MinTime: 10*time.Second, PermitWithoutStream: true,\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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}