{"record":{"id":"3131d927e5fc404c","repo":"gradle/gradle","slug":"reportfilename-capitalized-is-taking-too-long","errorCode":null,"errorMessage":"${reportFileName.capitalized()} is taking too long to write... The build might finish before the report has been completely written.","messagePattern":"(.+?) is taking too long to write\\.\\.\\. The build might finish before the report has been completely written\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"platforms/core-configuration/configuration-problems-base/src/main/kotlin/org/gradle/internal/configuration/problems/CommonReport.kt","lineNumber":200,"sourceCode":"                        writer.close()\n                    }\n                    executor.shutdown()\n                }\n                return Closed\n            }\n\n            private\n            fun closeHtmlReport(details: JsonSource) {\n                writer.endHtmlReport(details)\n                writer.close()\n            }\n\n            private\n            fun ManagedExecutor.shutdownAndAwaitTermination() {\n                shutdown()\n                if (!awaitTermination(1, TimeUnit.SECONDS)) {\n                    val unfinishedTasks = shutdownNow()\n                    logger.warn(\n                        \"${reportFileName.capitalized()} is taking too long to write... \"\n                            + \"The build might finish before the report has been completely written.\"\n                    )\n                    logger.info(\"Unfinished tasks: {}\", unfinishedTasks)\n                }\n            }\n\n            private\n            fun moveSpoolFileTo(outputDirectory: File): File {\n                val reportDir = getReportDirectory(outputDirectory)\n\n                val reportFile = reportDir.resolve(\"$reportFileName.html\")\n                if (distinctReports) {\n                    if (!reportFile.exists()) {\n                        moveFileToOutput(reportDir, reportFile)\n                    }\n                } else {\n                    moveFileToOutput(reportDir, reportFile)","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/gradle/gradle/blob/534f27719b66953f95cc907aae7f2c1b12f5482d/platforms/core-configuration/configuration-problems-base/src/main/kotlin/org/gradle/internal/configuration/problems/CommonReport.kt#L182-L218","documentation":"The configuration-cache / problems HTML report is written asynchronously on a ManagedExecutor. On shutdown the writer waits up to 1 second (awaitTermination); if report tasks have not finished, shutdownNow() cancels the remainder, this warning is logged, and the unfinished task count goes to debug logs. The consequence is a possibly truncated or incomplete report file — the build itself is unaffected.","triggerScenarios":"Very large builds producing thousands of configuration-cache/problems entries, slow or contended disks (network filesystems, throttled CI containers), or CPU overload making the 1-second grace period expire before spooled report tasks drain.","commonSituations":"Huge multi-project builds on CI; report directories on NFS or mounted volumes; builds with extensive problem diagnostics right after enabling stricter warning modes.","solutions":["Re-run the build — usually transient under I/O contention","Write reports to fast local storage instead of network mounts","Reduce report volume by fixing reported problems or relaxing org.gradle.warning.mode","Check debug logs ('Unfinished tasks: N') to see how many tasks were dropped"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# after the build, check the report landed intact before archiving\ntest -s build/reports/configuration-cache/report.html \\\n  || echo \"configuration cache report incomplete — rerun before archiving\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep build and report directories on local fast disks","Trim warning volume in very large builds","Do not treat the HTML report as guaranteed available before process exit"],"tags":["gradle","configuration-cache","report","io","performance"],"backgroundTag":"report-write-timeout","analyzedSha":"534f27719b66953f95cc907aae7f2c1b12f5482d","analyzedAt":"2026-08-22T08:09:12.375Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}