为什么Gradle Daemon会死? [英] Why did the Gradle Daemon die?
问题描述
我如何确定我的Gradle Daemon为何死亡?我得到的唯一消息是L
Gradle构建守护进程意外消失(可能已被杀死或可能崩溃)
这发生在活动构建中。
这是在移动我们的内存参数( Xmx
Xms
PermGen
) c $ c>到 gradle.properties
并直接调用 gradlew
。
$ b > export GRADLE_OPTS =\-Xmx1024m \\-Xms256m \\-XX:MaxPermSize = 256m \
export JAVA_HOME =/ usr / local / java / jdk1 .6
exec ./gradlew$ @
code> gradle.properties
org.gradle.java.home = / usr / local / java / jdk1.6 /
org.gradle.jvmargs = -Xmx1024m -Xms256m -XX:MaxPermSize = 256m
在这次更改之后,Gradle发出警告:
为了遵守这个构建的JVM设置,新的JVM将分叉。请考虑使用守护进程:http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
尽管我们没有要求,构建仍然运行在一个守护进程中,最终失败。 解决方案
当其他东西杀死长时间运行的Gradle Daemon进程和客户进程(守护进程使用本地TCP连接进行通信)时,最经常发生的情况是发送消息并得不到回应。
例如,运行 gradle --stop
或 killall java
构建正在发生时将重现此问题。
How do I determine why my Gradle Daemon died? The only message I get isL
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
This occurs in an active build. Several steps will finish and a step will appear to be active and then the build fails.
This began after moving our memory args (Xmx
Xms
PermGen
) from a shell script that called gradlew
to gradle.properties
and calling gradlew
directly.
build.sh
export GRADLE_OPTS="\"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=256m\""
export JAVA_HOME="/usr/local/java/jdk1.6"
exec ./gradlew "$@"
Addition to gradle.properties
org.gradle.java.home=/usr/local/java/jdk1.6/
org.gradle.jvmargs=-Xmx1024m -Xms256m -XX:MaxPermSize=256m
After this change Gradle warns:
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
And even though we don't ask it to, the build is running in a daemon, which ultimately fails.
Gradle build daemon disappeared unexpectedly
most frequently occurs when something else kills the long-running Gradle Daemon process and the client process (the Daemon uses local TCP connections to communicate) tries to send a message and gets no response.
For example, running gradle --stop
or killall java
while a build is occurring will reproduce this problem.
这篇关于为什么Gradle Daemon会死?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!