{"record":{"id":"6149276ae0b7b62c","repo":"apache/beam","slug":"heap-dump-uploaded-to","errorCode":null,"errorMessage":"Heap dump {} uploaded to {}","messagePattern":"Heap dump (.+?) uploaded to (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java","lineNumber":352,"sourceCode":"    if (localSource.exists()) {\n      if (uploadFilePath == null) {\n        LOG.warn(\"Heap dump {} detected but no upload directory was provided.\", localSource);\n      } else {\n        String remoteDest =\n            String.format(\"%s/heap_dump%s.hprof\", uploadFilePath, UUID.randomUUID());\n        if (gzipCompress) {\n          remoteDest = remoteDest + \".gz\";\n        }\n        LOG.warn(\n            \"Heap dump {} of {}MB detected, attempting to upload file to {}\",\n            localSource,\n            localSource.length() / 1024 / 1024,\n            remoteDest);\n        ResourceId resource = FileSystems.matchNewResource(remoteDest, false);\n        try {\n          uploadFile(localSource, resource, gzipCompress);\n          uploadedHeapDump = true;\n          LOG.warn(\"Heap dump {} uploaded to {}\", localSource, remoteDest);\n        } catch (IOException e) {\n          LOG.error(\"Error uploading heap dump to {}\", remoteDest, e);\n        }\n\n        try {\n          Files.delete(localSource.toPath());\n          LOG.info(\"Deleted local heap dump {}\", localSource);\n        } catch (IOException e) {\n          LOG.warn(\"Unable to delete local heap dump {}\", localSource, e);\n        }\n      }\n    }\n\n    return uploadedHeapDump;\n  }\n\n  private void uploadFile(File srcPath, ResourceId destination, boolean gzipCompress)\n      throws IOException {","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/MemoryMonitor.java#L334-L370","documentation":"Success confirmation logged by MemoryMonitor after uploadFile completed without throwing: the local heap dump was uploaded (optionally gzip-compressed) to the remote FileSystems resource. After logging, the monitor deletes the local dump. This is informational; it confirms a previous heap dump reached its configured destination.","triggerScenarios":"tryUploadHeapDumpIfItExists called uploadFile(localSource, resource, gzipCompress) which returned normally, after the dump was detected and a valid uploadFilePath was configured.","commonSituations":"Seen in worker logs following an OOM-triggered heap dump on Dataflow/other runners with heapDumpUploadPath set.","solutions":["No action needed; download the dump from the logged remoteDest for analysis (e.g. with Eclipse MAT).","If the dump appeared unexpectedly, investigate the preceding OOM/GC-thrashing logs for the memory issue."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Download the dump from the logged remoteDest promptly (worker storage is ephemeral)","Keep upload destinations organized (bucket/prefix) for post-mortem analysis"],"tags":["java","apache-beam","heap-dump","upload"],"backgroundTag":"heap-dump-uploaded","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}