{
  "id": "cicd/gradle-daemon-stopped-before-finish",
  "signature": "org.gradle.launcher.daemon.server.DaemonExpirationPeriodicCheck: Daemon will be stopped at the end of the build after running for 3 hours and exceeding the 2-hour idle timeout.",
  "signature_zh": "Gradle守护进程将在构建结束后停止，因为运行了3小时，超过了2小时的闲置超时时间。",
  "regex": "org\\.gradle\\.launcher\\.daemon\\.server\\.DaemonExpirationPeriodicCheck.*Daemon will be stopped",
  "domain": "cicd",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Gradle Daemon is configured with a low idle timeout (e.g., 2 hours) and the build runs longer than that, causing the daemon to be killed before the build completes, especially on long-running CI jobs.",
  "root_cause_type": "generic",
  "root_cause_zh": "Gradle守护进程配置了较低的闲置超时时间（例如2小时），而构建运行时间超过了该时间，导致守护进程在构建完成前被终止，尤其在长时间运行的CI任务中。",
  "versions": [
    {
      "version": "Gradle 7.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Gradle 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Gradle 8.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The daemon idle timeout is a Gradle configuration parameter, not a cache or runner issue.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Heap size affects memory, not the daemon's idle timeout behavior.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The timeout is set in gradle.properties or via command line flags, not by installation.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the daemon idle timeout in gradle.properties: org.gradle.daemon.idletimeout=7200000 (2 hours in milliseconds) or set it to 0 to disable idle timeout.",
      "success_rate": 0.85,
      "how": "Increase the daemon idle timeout in gradle.properties: org.gradle.daemon.idletimeout=7200000 (2 hours in milliseconds) or set it to 0 to disable idle timeout.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable the Gradle Daemon for CI builds by adding --no-daemon to the Gradle command, forcing a new JVM for each build.",
      "success_rate": 0.8,
      "how": "Disable the Gradle Daemon for CI builds by adding --no-daemon to the Gradle command, forcing a new JVM for each build.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Split the build into smaller, parallel tasks to reduce individual build time below the idle timeout threshold.",
      "success_rate": 0.75,
      "how": "Split the build into smaller, parallel tasks to reduce individual build time below the idle timeout threshold.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the daemon idle timeout in gradle.properties: org.gradle.daemon.idletimeout=7200000 (2 hours in milliseconds) or set it to 0 to disable idle timeout.",
    "Disable the Gradle Daemon for CI builds by adding --no-daemon to the Gradle command, forcing a new JVM for each build.",
    "Split the build into smaller, parallel tasks to reduce individual build time below the idle timeout threshold."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.gradle.org/current/userguide/gradle_daemon.html",
  "official_doc_section": null,
  "error_code": "DAEMON_EXPIRATION",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}