fawney19
1d72a8f9c1
feat: 流式空闲超时、健康监控查询优化、限流桶内存上限与维护清理修复
Close #233
Co-authored-by: AAEE86 <ppk0227@hotmail.com>
- cli_monitor_mixin: 引入 STREAM_IDLE_TIMEOUT_SECONDS(可通过环境变量配置),
流传输开始后若超出空闲窗口无新 chunk 则提前取消并返回 504,避免长时间挂起
- stream_context: 新增 managed_recorded_bodies 上下文管理器,确保 chunks 在
telemetry 完成后及时释放;stream_telemetry 使用该接口统一管理 response body 构建
- health endpoint: 将状态聚合改为 GROUP BY 直接统计,事件列表按 api_format
单独查询,避免单次 limit 拉取大量记录导致的遗漏与性能问题;同时过滤不活跃
provider/endpoint,与公开健康接口保持一致
- endpoint health service: 修正时间线数据按 endpoint_id 而非 key_id 聚合
- token_bucket: 引入 max_buckets/bucket_expiry 上限与定时清理,防止内存无限增长;
修复 refill_rate=0 时 get_reset_time 除零异常;新增 _is_unlimited_rate_limit 判断
- maintenance_scheduler: 调整清理顺序(先删整行再按窗口清理),新增 newer_than
边界参数,避免同一行在同一轮中被重复改写
- sync_execute: 新增 create_pending_usage 开关,允许已预创建记录的调用方跳过重复创建
- quota_reader / provider_ops balance: 小幅修复与健壮性提升
- Dockerfile: 添加 MALLOC_ARENA_MAX=2 环境变量以降低 gunicorn worker RSS
- 补充相关测试覆盖
2026-03-18 23:38:26 +08:00
..
2026-02-16 11:00:48 +08:00
2026-03-09 18:26:53 +08:00
2026-02-28 11:45:04 +08:00
2026-02-04 02:04:54 +08:00
2025-12-18 02:20:53 +08:00
2026-03-12 17:11:14 +08:00
2026-03-17 16:34:09 +08:00
2026-02-16 11:00:48 +08:00
2026-03-03 17:24:22 +08:00
2026-03-14 11:59:07 +08:00
2026-03-14 01:33:08 +08:00
2026-02-09 11:37:41 +08:00
2026-03-09 14:54:45 +08:00
2026-02-27 13:54:46 +08:00
2026-03-07 15:33:29 +08:00
2026-02-27 13:54:46 +08:00
2026-03-15 00:23:19 +08:00
2026-03-15 00:23:19 +08:00
2026-02-06 16:37:06 +08:00
2026-03-18 12:35:57 +08:00
2026-02-05 15:59:41 +08:00
2026-03-05 15:15:26 +08:00
2026-03-07 15:33:29 +08:00
2026-02-16 11:00:48 +08:00
2026-03-14 11:59:07 +08:00
2026-03-10 23:14:05 +08:00
2026-03-10 10:40:50 +08:00
2026-02-01 17:28:00 +08:00
2026-03-09 22:57:23 +08:00
2026-03-10 12:47:50 +08:00
2026-03-17 16:34:09 +08:00
2026-03-18 20:43:14 +08:00
2026-03-08 00:05:48 +08:00
2026-03-16 01:12:35 +08:00
2026-03-10 10:40:50 +08:00
2026-03-10 10:40:50 +08:00
2026-02-27 13:58:58 +08:00
2026-03-04 22:06:19 +08:00
2026-03-05 09:53:23 +08:00
2026-03-10 10:40:50 +08:00
2026-03-04 22:06:19 +08:00
2026-03-14 11:59:07 +08:00
2026-03-05 09:53:23 +08:00
2026-03-05 15:15:26 +08:00
2026-03-04 22:06:19 +08:00
2026-03-04 22:51:02 +08:00
2026-02-27 13:58:58 +08:00
2026-03-04 22:06:19 +08:00
2026-03-15 16:56:58 +08:00
2026-03-12 01:11:35 +08:00
2026-03-12 01:11:35 +08:00
2026-03-05 02:07:34 +08:00
2026-02-28 16:54:37 +08:00
2026-03-10 14:55:48 +08:00
2026-03-14 01:33:08 +08:00
2026-02-28 14:12:08 +08:00
2026-03-03 09:22:20 +08:00
2026-03-16 01:12:35 +08:00
2026-03-10 10:40:50 +08:00
2026-03-02 12:27:51 +08:00
2026-03-03 09:22:20 +08:00
2026-02-27 13:54:46 +08:00
2026-03-15 23:13:11 +08:00
2026-02-07 02:59:02 +08:00
2026-02-27 13:54:46 +08:00
2026-03-01 23:55:26 +08:00
2026-02-01 17:28:00 +08:00
2026-03-18 23:38:26 +08:00
2026-02-07 02:59:02 +08:00
2026-03-17 02:57:36 +08:00
2026-03-18 23:38:26 +08:00
2026-03-09 22:57:23 +08:00
2026-03-18 13:43:39 +08:00
2026-03-18 13:43:39 +08:00
2026-03-07 15:33:29 +08:00
2026-03-18 13:43:39 +08:00
2026-01-22 14:23:33 +08:00
2026-02-06 16:37:06 +08:00
2026-03-01 23:32:48 +08:00
2026-03-18 20:43:14 +08:00
2026-03-01 23:55:26 +08:00
2026-03-14 11:59:07 +08:00
2026-03-18 17:56:48 +08:00
2026-03-11 16:12:36 +08:00
2026-03-09 22:57:23 +08:00
2026-03-11 15:11:33 +08:00
2026-03-08 14:31:15 +08:00
2026-03-15 14:22:59 +08:00
2026-03-10 14:42:33 +08:00
2026-03-08 00:05:48 +08:00
2026-03-11 15:11:33 +08:00
2026-03-07 15:33:29 +08:00
2026-03-11 15:11:33 +08:00
2026-03-09 22:57:23 +08:00