Gradle java.lang.OutOfMemoryError: Metaspace
Gradle java.lang.OutOfMemoryError: Metaspace
目前我正在开发 Spring boot 2.1 项目,该项目配置了 Gradle 5.2.1。但是我在构建项目时出现了内存不足的错误,无法理解具体原因。
请查收附件日志
Caused by: org.gradle.cache.CacheOpenException: Could not open proj generic class cache for build file '/Users/mac/project/build.gradle' (/Users/mac/.gradle/caches/5.2.1/scripts/eajdx6l75dt1ypyljdsfupplm/proj/proj3ca90766b0adfce53d4b035e7e9dc5fe).
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:80)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:42)
at org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:94)
at org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:68)
at org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.open(DefaultCacheRepository.java:118)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:421)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:390)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:175)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:155)
at org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98)
at org.gradle.cache.internal.FixedSharedModeCrossProcessCacheAccess.run(FixedSharedModeCrossProcessCacheAccess.java:85)
at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:207)
at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:197)
at org.gradle.cache.internal.FixedSharedModeCrossProcessCacheAccess.open(FixedSharedModeCrossProcessCacheAccess.java:83)
at org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:142)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:78)
... 133 more
Caused by: java.lang.OutOfMemoryError: Metaspace
首先终止 Java(TM) Platform SE 二进制进程,然后删除整个 /Users//.gradle/caches 文件夹,这将允许 Gradle 命令再次运行。
this 帖子可能会对您有所帮助。
目前我正在开发 Spring boot 2.1 项目,该项目配置了 Gradle 5.2.1。但是我在构建项目时出现了内存不足的错误,无法理解具体原因。
请查收附件日志
Caused by: org.gradle.cache.CacheOpenException: Could not open proj generic class cache for build file '/Users/mac/project/build.gradle' (/Users/mac/.gradle/caches/5.2.1/scripts/eajdx6l75dt1ypyljdsfupplm/proj/proj3ca90766b0adfce53d4b035e7e9dc5fe).
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:80)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:42)
at org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:94)
at org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:68)
at org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.open(DefaultCacheRepository.java:118)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:421)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$RemapBuildScriptsAction.execute(FileCacheBackedScriptClassCompiler.java:390)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:175)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:155)
at org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:98)
at org.gradle.cache.internal.FixedSharedModeCrossProcessCacheAccess.run(FixedSharedModeCrossProcessCacheAccess.java:85)
at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:207)
at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:197)
at org.gradle.cache.internal.FixedSharedModeCrossProcessCacheAccess.open(FixedSharedModeCrossProcessCacheAccess.java:83)
at org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:142)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:78)
... 133 more
Caused by: java.lang.OutOfMemoryError: Metaspace
首先终止 Java(TM) Platform SE 二进制进程,然后删除整个 /Users//.gradle/caches 文件夹,这将允许 Gradle 命令再次运行。
this 帖子可能会对您有所帮助。