{
  "id": "go/net-http-server-shutdown-graceful-timeout",
  "signature": "error: http: Server closed",
  "signature_zh": "错误：http：服务器已关闭",
  "regex": "error:\\ http:\\ Server\\ closed",
  "domain": "go",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "The HTTP server was shut down while handling requests, causing in-flight requests to fail with 'Server closed'.",
  "root_cause_type": "generic",
  "root_cause_zh": "HTTP服务器在处理请求时关闭，导致正在进行的请求失败并返回“服务器已关闭”。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using Shutdown without waiting for active connections",
      "why_fails": "Active connections are terminated abruptly; use Shutdown with context.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use Shutdown with a context timeout and wait for connections to drain",
      "success_rate": 0.95,
      "how": "ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\ndefer cancel()\nif err := server.Shutdown(ctx); err != nil { log.Fatal(err) }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-05-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}