200 并发打接口半数 429 连接池 max_connections 实测怎么定

陆零云 30 0
压测脚本 200 个线程同时打 OpenAI 兼容接口,模型 gpt-4o-mini,跑 1000 个请求。结果一半 429,日志里全是 rate_limit_exceeded,另外还有几十条 Connection pool is full, discarding connection 的警告。 先看连接池。requests 的 Session 默认 pool_connections 和 pool_maxsize 都是 10,200 个线程共用一个 Ses...