-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide more insights about "Multiple Gradle daemons were used". #63
Comments
Make sure you're not sharing your Gradle user home between containers. By default the profiler will put it in the project directory. It contains the daemon registry and if that is shared by multiple containers running builds at the same time they will kill each others daemons. The Gradle profiler shouldn't need more info on this, it should already be in the profile.log, because Gradle prints why it started a new daemon. |
I do share Gradle user home to avoid Gradle and dependencies download on every run, but I don't run multiple containers at the same time… And I've also seen it happening without containerization. I'll re-investigate logs when I see it again! |
Closing since there was no more feedback. Feel free to reopen if you have new insights. |
We see this somewhat regularly and the logs yield no information. We kill all daemons on the CI node before and after running the profiler as well.
It happens after around the second warmup, and any daemon processes are coming from the profiler exec itself. Anything we could try to look for or check? |
We just gave up on trying to work around this and believe that Gradle's GC polling is currently flawed. We disable GC polling instead via setting the |
Just ran into this problem myself. I imagine there's a lot of reasons a daemon can be stopped for but in my case it was a lower-than-necessary memory limit for the build.
The daemon logs may have more info as well:
|
I am getting this too
@ZacSweers How/where should I setup that properties? For my user? For gradle-profiler? For my project? |
"org.gradle.daemon.gc.polling.disabled" is a gradle property...looks like you set it via "-Porg.gradle.daemon.gc.polling.disabled=true" as a gradle param or via the GRADLE_OPTS env var |
I don't see anything in the checkpid code that would be affected by that flag though: Looks like a fairly simple pid comparison of gradle daemons...no way to opt out in that code... |
Sometimes when I run benchmarks/profiling it fails with
But nowhere in stdout/stderr or
profile.log
can I find logs that indicate when and why Gradle daemon was started.What's more weird is that I'm getting that in very isolated environment: a Docker container gets started for every profile/benchmark session.
(But I've also seen it in non-containerized runs).
Would be great if gradle-profiler could give more info about it, ideally it should be actionable :)
The text was updated successfully, but these errors were encountered: