# Gradle 守护进程意外消失（可能被杀死或超时）。守护进程日志文件：/home/user/.gradle/daemon/8.5/daemon-12345.out.log

- **ID:** `java/gradle-daemon-timeout`
- **领域:** java
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

Gradle 守护进程内存不足或被操作系统因资源限制杀死。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 8+ | active | — | — |

## 解决方案

1. **Increase the Gradle daemon's heap size in gradle.properties** (90% 成功率)
   ```
   org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
   ```
2. **Restart the daemon with a clean state** (85% 成功率)
   ```
   gradle --stop && gradle build
   ```

## 无效尝试

- **Increasing the heap size for all JVM processes globally** — The daemon may still be killed if the system has other memory-intensive processes. (70% 失败率)
- **Disabling the daemon entirely** — Builds become slower without the daemon, but it may work as a temporary fix. (50% 失败率)
