{
  "id": "grpc/grpc-max-concurrent-streams-exceeded",
  "signature": "INTERNAL: grpc: max concurrent streams exceeded on server",
  "signature_zh": "内部错误: grpc: 服务器上超过最大并发流数",
  "regex": "INTERNAL: grpc: max concurrent streams exceeded on server",
  "domain": "grpc",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Server's HTTP/2 max concurrent streams limit (default 100) is reached, and new streams are rejected.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器的 HTTP/2 最大并发流限制（默认 100）已达到，新流被拒绝。",
  "versions": [
    {
      "version": "grpc-go 1.61.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "grpc-java 1.60.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "envoy 1.27.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx 1.25.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The limit is on the server side per connection; client pool size doesn't affect server stream limits.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Stream count is unrelated to message size; this does not free up stream slots.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the server's max concurrent streams limit. In gRPC-Go, use:\n  import \"google.golang.org/grpc\"\n  s := grpc.NewServer(grpc.MaxConcurrentStreams(200))\n  Or set environment variable GRPC_GO_MAX_CONCURRENT_STREAMS=200 before starting the server.",
      "success_rate": 0.85,
      "how": "Increase the server's max concurrent streams limit. In gRPC-Go, use:\n  import \"google.golang.org/grpc\"\n  s := grpc.NewServer(grpc.MaxConcurrentStreams(200))\n  Or set environment variable GRPC_GO_MAX_CONCURRENT_STREAMS=200 before starting the server.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce the number of long-lived streams by batching requests or using unary RPCs instead of streaming. Alternatively, add more server instances behind a load balancer to distribute streams.",
      "success_rate": 0.75,
      "how": "Reduce the number of long-lived streams by batching requests or using unary RPCs instead of streaming. Alternatively, add more server instances behind a load balancer to distribute streams.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the server's max concurrent streams limit. In gRPC-Go, use:\n  import \"google.golang.org/grpc\"\n  s := grpc.NewServer(grpc.MaxConcurrentStreams(200))\n  Or set environment variable GRPC_GO_MAX_CONCURRENT_STREAMS=200 before starting the server.",
    "Reduce the number of long-lived streams by batching requests or using unary RPCs instead of streaming. Alternatively, add more server instances behind a load balancer to distribute streams."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/performance/#flow-control",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}