Almost done upgrading to grails 5. I need to support grails 4 for 1 more month or so. Unfortunately Grails 4 can't get past the compileGroovy . Depending on increase of jvm settings (which I have tried very high values out of curiosity), it either
- errors out with GC limit exceeded,
- it hangs after a certain period of time. CPU usage drops off and it basically idles endlessly.
This is odd since the last commit was very light. I can control failure or success by removing a single domain class.
debug from GC error:
14:27:38.336 [DEBUG]
[org.gradle.api.internal.classloading.ClassInfoCleaningGroovySystemLoader] Removed ClassInfo from org.codehaus.groovy.runtime.metaclass.MetaMethodIndex$Entry loaded by VisitableURLClassLoader(api-groovy-compile-loader)
14:27:40.570 [LIFECYCLE] [org.gradle.process.internal.health.memory.MemoryManager]
14:27:40.570 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16719904768, Free: 9322885120}
14:27:40.570 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16719904768, Free: 9322885120}
14:27:40.570 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM
memory status event {Maximum: 1908932608, Committed: 571473920}
14:27:39.421 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]
14:27:39.421 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :compileGroovy FAILED
14:27:40.914 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'compiler daemon'
14:27:40.914 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'compiler daemon' completed
14:27:40.914 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute compile for :compileGroovy'
14:27:40.914 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute compile for :compileGroovy' completed
14:27:40.915 [DEBUG] [org.gradle.api.internal.changedetection.changes.TaskFingerprintUtil] Fingerprinting property destinationDir (Output) for task ':compileGroovy'
14:27:40.928 [DEBUG] [org.gradle.internal.execution.impl.steps.CacheStep] Not storing result of task ':compileGroovy' in cache because the execution failed
Endless cyclical message when it hangs is just an emission of a memory update event
14:41:54.361 [DEBUG] [org.gradle.api.internal.classloading.ClassInfoCleaningGroovySystemLoader] Removed ClassInfo from [Ljava.beans.PropertyDescriptor; loaded by null
14:41:54.361 [DEBUG] [org.gradle.api.internal.classloading.ClassInfoCleaningGroovySystemLoader] Removed ClassInfo from org.codehaus.groovy.runtime.metaclass.MetaMethodIndex$Entry loaded by VisitableURLClassLoader(api-groovy-compile-loader)
14:41:56.633 [LIFECYCLE] [org.gradle.process.internal.health.memory.MemoryManager]
14:41:56.633 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16719904768, Free: 8231411712}
14:41:56.633 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16719904768, Free: 8231411712}
14:41:56.633 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 7635730432, Committed: 492306432}
14:42:01.633 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 16719904768, Free: 8210542592}
14:42:01.633 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16719904768, Free: 8210542592}
14:42:01.633 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 7635730432, Committed: 492306432}
//repeated endlessly
[org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 16719904768, Free: 8210542592}
14:42:01.633 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 7635730432, Committed: 492306432}
Using grails 4.1.2, java 8.0.302. Anyone encountered an issue like this with big grails projects? Not an issue with grails 5.