Shubham Singh
01/03/2025, 5:17 PMkotlin.daemon.jvmargs
property inside my gradle.properties
file (e.g. replace -Xmx2048
with -Xmx2048m
) >>
kobweb run
), make changes to any file, and save (using Cmd + S
). Has anyone else observed these?David Herman
01/03/2025, 5:19 PMDavid Herman
01/03/2025, 5:19 PMShubham Singh
01/03/2025, 5:20 PMDavid Herman
01/03/2025, 5:20 PMDavid Herman
01/03/2025, 5:20 PMShubham Singh
01/03/2025, 5:21 PMcompose = "1.7.1"
kobweb = "0.20.0"
kotlin = "2.1.0"
Error stack trace:
e: The daemon has terminated unexpectedly on startup attempt #1 with exit code: 1. The daemon process output:
1. Error occurred during initialization of VM
2. Too small maximum heap
The daemon didn't produce the message "Kotlin compile daemon is ready" during startup.
e: The daemon has terminated unexpectedly on startup attempt #2 with exit code: 1. The daemon process output:
1. Error occurred during initialization of VM
2. Too small maximum heap
Problems may have occurred during auto-selection of GC. The preferred GC is Parallel GC.
If the problems persist, try adding the JVM option to the Kotlin daemon JVM arguments: -XX:-UseParallelGC.
GC auto-selection logic is disabled temporary for the next daemon startup.
The daemon didn't produce the message "Kotlin compile daemon is ready" during startup.
e: The daemon has terminated unexpectedly on startup attempt #3 with exit code: 1. The daemon process output:
1. Error occurred during initialization of VM
2. Too small maximum heap
The daemon didn't produce the message "Kotlin compile daemon is ready" during startup.
e: Failed connecting to the daemon in 4 retries
e: Daemon compilation failed: Could not connect to Kotlin compile daemon
java.lang.RuntimeException: Could not connect to Kotlin compile daemon
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:214)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111)
at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:76)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:195)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:128)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:170)
at org.gradle.internal.Factories$1.create(Factories.java:31)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:267)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:131)
at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:136)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:165)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:134)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1575)
David Herman
01/03/2025, 5:21 PMShubham Singh
01/03/2025, 5:21 PMHave you tried rebooting your machine?Yes I have
David Herman
01/03/2025, 5:21 PMDavid Herman
01/03/2025, 5:22 PMShubham Singh
01/03/2025, 5:22 PMOtherwise you might want to bump up the daemon heap size in your gradle propertiesThis is my current value:
kotlin.daemon.jvmargs=-Xmx2048
Even when I bump it to 4096
, I see the same errorsDavid Herman
01/03/2025, 5:23 PMShubham Singh
01/03/2025, 5:23 PMDavid Herman
01/03/2025, 5:23 PMDavid Herman
01/03/2025, 5:23 PMDavid Herman
01/03/2025, 5:23 PMShubham Singh
01/03/2025, 5:24 PM1g
equivalent to 1024
?Shubham Singh
01/03/2025, 5:24 PMDavid Herman
01/03/2025, 5:25 PMDavid Herman
01/03/2025, 5:25 PMDavid Herman
01/03/2025, 5:25 PMDavid Herman
01/03/2025, 5:26 PMShubham Singh
01/03/2025, 5:27 PMYeah I think you need to use a unitThis fixed the issue 🙀 I replaced
2048
with 2048m
and the errors went away 😂
This is so interesting as I've never had to touch this value in any of my projects ever beforeDavid Herman
01/03/2025, 5:28 PMShubham Singh
01/03/2025, 5:28 PMDavid Herman
01/03/2025, 5:28 PM