{
  "id": "aws/rds-proxy-connection-limit-exceeded",
  "signature": "FATAL: sorry, too many clients already (RDS Proxy connection limit exceeded)",
  "signature_zh": "FATAL：抱歉，客户端数量过多（RDS Proxy 连接限制已超出）",
  "regex": "FATAL: sorry, too many clients already \\(RDS Proxy connection limit exceeded\\)",
  "domain": "aws",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The RDS Proxy has reached its maximum concurrent connections limit, often due to connection leaks or insufficient proxy capacity.",
  "root_cause_type": "generic",
  "root_cause_zh": "RDS Proxy 已达到最大并发连接数限制，通常是由于连接泄漏或代理容量不足。",
  "versions": [
    {
      "version": "RDS Proxy 1.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "PostgreSQL 13.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "MySQL 8.0.33",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the database instance max_connections without adjusting RDS Proxy's MaxConnectionsPercent parameter still leaves the proxy as the bottleneck.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the RDS Proxy doesn't solve the underlying issue of connection leaks from the application; connections will quickly exhaust the limit again.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the RDS Proxy's MaxConnectionsPercent in the proxy settings (console or CLI with 'aws rds modify-db-proxy --db-proxy-name myproxy --max-connections-percent 100'). This allows more connections proportional to the database instance's max_connections.",
      "success_rate": 0.85,
      "how": "Increase the RDS Proxy's MaxConnectionsPercent in the proxy settings (console or CLI with 'aws rds modify-db-proxy --db-proxy-name myproxy --max-connections-percent 100'). This allows more connections proportional to the database instance's max_connections.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Fix connection leaks in the application: ensure database connections are properly closed in all code paths (e.g., using connection pools with 'maxLifetime' and 'idleTimeout' settings). Implement a connection pool library like HikariCP (Java) or pgBouncer (PostgreSQL).",
      "success_rate": 0.9,
      "how": "Fix connection leaks in the application: ensure database connections are properly closed in all code paths (e.g., using connection pools with 'maxLifetime' and 'idleTimeout' settings). Implement a connection pool library like HikariCP (Java) or pgBouncer (PostgreSQL).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在代理设置中增加 RDS Proxy 的 MaxConnectionsPercent（控制台或使用 CLI 'aws rds modify-db-proxy --db-proxy-name myproxy --max-connections-percent 100'）。这允许代理根据数据库实例的 max_connections 按比例处理更多连接。",
    "修复应用程序中的连接泄漏：确保在所有代码路径中正确关闭数据库连接（例如，使用连接池，设置 'maxLifetime' 和 'idleTimeout'）。使用像 HikariCP（Java）或 pgBouncer（PostgreSQL）这样的连接池库。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}