# http: 连接池耗尽

- **ID:** `go/http-connection-pool-exhausted`
- **领域:** go
- **类别:** resource_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

HTTP客户端达到最大空闲连接数，因限制无法创建新连接。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.20 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Use http.Transport with appropriate MaxIdleConns and MaxIdleConnsPerHost settings
   ```
2. **** (85% 成功率)
   ```
   Implement connection pooling with a worker pool to limit concurrency
   ```

## 无效尝试

- **** — May still hit OS file descriptor limits (50% 失败率)
- **** — Increases latency and connection overhead (40% 失败率)
