{
  "id": "grpc/max-concurrent-streams-exceeded",
  "signature": "INTERNAL: grpc: max concurrent streams exceeded on server: 128 active streams, limit 100",
  "signature_zh": "INTERNAL: gRPC: 服务器上最大并发流超出：128 个活动流，限制 100",
  "regex": "max concurrent streams exceeded on server: \\d+ active streams, limit \\d+",
  "domain": "grpc",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The gRPC server has reached its configured maximum number of concurrent streams (default 100 in many implementations) and rejected new stream creation due to resource exhaustion.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 服务器已达到配置的最大并发流数（许多实现中默认 100），由于资源耗尽而拒绝创建新流。",
  "versions": [
    {
      "version": "gRPC-go v1.58.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-java v1.57.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "C-core v1.58.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Simply increasing the limit without addressing slow consumers or long-lived streams can lead to memory exhaustion and OOM kills.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding more server instances without adjusting client connection pooling may cause clients to still hit per-connection limits on each instance.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the max concurrent streams limit in server configuration. In Go: server := grpc.NewServer(grpc.MaxConcurrentStreams(200)). In Java: NettyServerBuilder.forPort(port).maxConcurrentCallsPerConnection(200).",
      "success_rate": 0.85,
      "how": "Increase the max concurrent streams limit in server configuration. In Go: server := grpc.NewServer(grpc.MaxConcurrentStreams(200)). In Java: NettyServerBuilder.forPort(port).maxConcurrentCallsPerConnection(200).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable client-side connection multiplexing by setting grpc.initial_conn_window_size to a higher value (e.g., 1MB) and use a load balancer to distribute streams across multiple server connections.",
      "success_rate": 0.8,
      "how": "Enable client-side connection multiplexing by setting grpc.initial_conn_window_size to a higher value (e.g., 1MB) and use a load balancer to distribute streams across multiple server connections.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement stream pooling or batching on the client: instead of opening one stream per request, use client-side streaming to send multiple messages over a single stream, reducing the total stream count.",
      "success_rate": 0.75,
      "how": "Implement stream pooling or batching on the client: instead of opening one stream per request, use client-side streaming to send multiple messages over a single stream, reducing the total stream count.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the max concurrent streams limit in server configuration. In Go: server := grpc.NewServer(grpc.MaxConcurrentStreams(200)). In Java: NettyServerBuilder.forPort(port).maxConcurrentCallsPerConnection(200).",
    "Enable client-side connection multiplexing by setting grpc.initial_conn_window_size to a higher value (e.g., 1MB) and use a load balancer to distribute streams across multiple server connections.",
    "Implement stream pooling or batching on the client: instead of opening one stream per request, use client-side streaming to send multiple messages over a single stream, reducing the total stream count."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/performance/#streams",
  "official_doc_section": null,
  "error_code": "GRPC_MAX_CONCURRENT_STREAMS",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.82,
  "resolvable": "partial",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}