I found quite a few Kotlin compiler logs. There seems to be a repetitive pattern. First daemon starts and shutdown after a few seconds. Meanwhile another another daemon starts, detects previous daemon and shutdown.
2020-06-09 14:29:53.862 [daemon] INFO: Kotlin compiler daemon version 1.3.61-release-180 (1.3.61)
2020-06-09 14:29:56.607 [daemon] INFO: daemon JVM args: -Djava.awt.headless=true -Djava.rmi.server.hostname=127.0.0.1 -Xmx8g -XX:MaxMetaspaceSize=1024m -Dkotlin.environment.keepalive -ea
2020-06-09 14:29:56.624 [daemon] INFO: daemon args: --daemon-runFilesPath /Users/svyatoslav.chatchenk/Library/Application Support/kotlin/daemon --daemon-autoshutdownIdleSeconds=7200 --daemon-compilerClasspath /Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.61/c35c0833d5a1e3d229359758482c480306724618/kotlin-compiler-embeddable-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.61/2e07c9a84c9e118efb70eede7e579fd663932122/kotlin-reflect-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.72/8032138f12c0180bc4e51fe139d4c52b46db6109/kotlin-stdlib-1.3.72.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.3.61/e5feb39c8de63dcbdc1154b34ca4413874231605/kotlin-script-runtime-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-daemon-embeddable/1.3.61/4de83e41a92c8395d89ab2e81d26b788ba163824/kotlin-daemon-embeddable-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.intellij.deps/trove4j/1.0.20181211/216c2e14b070f334479d800987affe4054cd563f/trove4j-1.0.20181211.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.72/6ca8bee3d88957eaaaef077c41c908c9940492d8/kotlin-stdlib-common-1.3.72.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/16.0.2/dab5655eb9abe23f2245c34e66c9813c7daf4563/annotations-16.0.2.jar:/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/lib/tools.jar
2020-06-09 14:29:56.683 [daemon] INFO: starting daemon
2020-06-09 14:29:57.023 [daemon] INFO: daemon is listening on port: 17284
2020-06-09 14:29:57.032 [compiler] INFO: initiate elections
2020-06-09 14:29:58.022 [compiler] INFO: No more clients left
2020-06-09 14:29:58.023 [compiler] INFO: Delayed shutdown in 1000ms
2020-06-09 14:29:58.078 [compiler] INFO: getDaemonJVMOptions: DaemonJVMOptions(maxMemory=8g, maxMetaspaceSize=1024m, reservedCodeCacheSize=, jvmParams=[-Djava.awt.headless=true, -Djava.rmi.server.hostname=127.0.0.1, -Dkotlin.environment.keepalive, -ea, Dkotlin.environment.keepalive, ea])
2020-06-09 14:29:59.024 [compiler] INFO: Shutdown started
2020-06-09 14:29:59.025 [compiler] INFO: Memory stats: total: 245mb, free: 234mb, max: 7282mb
2020-06-09 14:29:59.026 [compiler] INFO: Shutdown complete
2020-06-09 14:29:57.390 [daemon] INFO: Kotlin compiler daemon version 1.3.61-release-180 (1.3.61)
2020-06-09 14:29:57.604 [daemon] INFO: daemon JVM args: -Djava.awt.headless=true -Djava.rmi.server.hostname=127.0.0.1 -Xmx8g -XX:MaxMetaspaceSize=1024m -Dkotlin.environment.keepalive -ea
2020-06-09 14:29:57.626 [daemon] INFO: daemon args: --daemon-runFilesPath /Users/svyatoslav.chatchenk/Library/Application Support/kotlin/daemon --daemon-autoshutdownIdleSeconds=7200 --daemon-compilerClasspath /Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.61/c35c0833d5a1e3d229359758482c480306724618/kotlin-compiler-embeddable-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.3.61/2e07c9a84c9e118efb70eede7e579fd663932122/kotlin-reflect-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.3.72/8032138f12c0180bc4e51fe139d4c52b46db6109/kotlin-stdlib-1.3.72.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-script-runtime/1.3.61/e5feb39c8de63dcbdc1154b34ca4413874231605/kotlin-script-runtime-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-daemon-embeddable/1.3.61/4de83e41a92c8395d89ab2e81d26b788ba163824/kotlin-daemon-embeddable-1.3.61.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.intellij.deps/trove4j/1.0.20181211/216c2e14b070f334479d800987affe4054cd563f/trove4j-1.0.20181211.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.3.72/6ca8bee3d88957eaaaef077c41c908c9940492d8/kotlin-stdlib-common-1.3.72.jar:/Users/svyatoslav.chatchenk/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/16.0.2/dab5655eb9abe23f2245c34e66c9813c7daf4563/annotations-16.0.2.jar:/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/lib/tools.jar
2020-06-09 14:29:57.733 [daemon] INFO: starting daemon
2020-06-09 14:29:57.984 [daemon] INFO: daemon is listening on port: 17198
2020-06-09 14:29:57.996 [compiler] INFO: initiate elections
2020-06-09 14:29:58.009 [compiler] INFO: found daemon on port 17284 (1000 ms old), trying to connect
2020-06-09 14:29:58.096 [compiler] INFO: Assuming other daemons have higher prio, handover clients to it and schedule shutdown: my runfile: kotlin-daemon.2020-06-09T12-29-57.870Z.40c8bc1be5268d9e26a826a2aae8bb32.17198.run (1591705797000) vs best other runfile: kotlin-daemon.2020-06-09T12-29-56.921Z.40c8bc1be5268d9e26a826a2aae8bb32.17284.run (1591705796000)
2020-06-09 14:29:58.097 [compiler] INFO: Graceful shutdown signalled
2020-06-09 14:29:58.099 [compiler] INFO: Delayed shutdown in 1000ms
2020-06-09 14:29:59.100 [compiler] INFO: Shutdown started
2020-06-09 14:29:59.102 [compiler] INFO: Memory stats: total: 245mb, free: 235mb, max: 7282mb
2020-06-09 14:29:59.102 [compiler] INFO: Shutdown complete
This process. There are at least a hundred of logs like that. Btw full message is
Could not perform incremental compilation: Could not connect to Kotlin compile daemon
Could not connect to kotlin daemon. Using fallback strategy.
Can you tell us some more about your build and your environment?
This is an android application with more than 100 Gradle modules. Let me know what exactly you want to know. I could share a build scan report with you privately. Let me know if it could help and how to send it to you.
Can you maybe even provide a reproducer?
I’ll try to create one later.