公开 API 和后台的 http.Server 只设置了 ReadHeaderTimeout;收到 SIGTERM 直接退出,正在处理的请求(如大批量回流、导入)会被中断。
http.Server
ReadHeaderTimeout
ReadTimeout 60s
WriteTimeout 60s
IdleTimeout 120s
ReadHeaderTimeout 10s
Shutdown
docker-compose.prod.yml
stop_grace_period: 30s
来源:只读审查 main@36f9c95(2026-10-23)。
已由 #56 合并(main c163f2b7)。合并前已把最新 main 合入分支,并在本地按 .github/workflows/ci.yml 跑通:Go 1.27.3 的 gofmt/vet/build/test(PostgreSQL 16,后台 DB 测试 0 跳过)、Python ruff/pytest(52 通过)、迁移 up/down、两份 compose config;#46 另做了 SIGTERM 优雅退出验证(退出码 0)。生产尚未部署。
Written by Devin
No dependencies set.
The note is not visible to the blocked user.
现状
公开 API 和后台的
http.Server只设置了ReadHeaderTimeout;收到 SIGTERM 直接退出,正在处理的请求(如大批量回流、导入)会被中断。要求
ReadTimeout 60s、WriteTimeout 60s、IdleTimeout 120s(保留ReadHeaderTimeout 10s)。Shutdown,最多等 25 秒,再关闭数据库连接池。docker-compose.prod.yml的 api/admin 设stop_grace_period: 30s。验收
来源:只读审查 main@36f9c95(2026-10-23)。
已由 #56 合并(main c163f2b7)。合并前已把最新 main 合入分支,并在本地按 .github/workflows/ci.yml 跑通:Go 1.27.3 的 gofmt/vet/build/test(PostgreSQL 16,后台 DB 测试 0 跳过)、Python ruff/pytest(52 通过)、迁移 up/down、两份 compose config;#46 另做了 SIGTERM 优雅退出验证(退出码 0)。生产尚未部署。
Written by Devin