{"record":{"id":"f05187d0ad5c0cc0","repo":"apache/seatunnel","slug":"running-job-dag-json-cache-evicted-entries-due-to","errorCode":null,"errorMessage":"Running job dag json cache evicted entries due to max size: evicted={}, expiredRemoved={}, remaining={}, background={}","messagePattern":"Running job dag json cache evicted entries due to max size: evicted=(.+?), expiredRemoved=(.+?), remaining=(.+?), background=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java","lineNumber":305,"sourceCode":"                    needEvict--;\n                    evicted++;\n                }\n            }\n        }\n\n        if (expiredRemoved <= 0 && evicted <= 0) {\n            return;\n        }\n        long lastLog = RUNNING_JOB_DAG_CACHE_LAST_LOG_MS.get();\n        if (nowMs - lastLog < RUNNING_JOB_DAG_CACHE_CLEANUP_INTERVAL_MS) {\n            return;\n        }\n        if (!RUNNING_JOB_DAG_CACHE_LAST_LOG_MS.compareAndSet(lastLog, nowMs)) {\n            return;\n        }\n\n        if (evicted > 0) {\n            log.warn(\n                    \"Running job dag json cache evicted entries due to max size: evicted={}, expiredRemoved={}, remaining={}, background={}\",\n                    evicted,\n                    expiredRemoved,\n                    RUNNING_JOB_DAG_JSON_CACHE.size(),\n                    background);\n        } else {\n            log.debug(\n                    \"Running job dag json cache cleanup: expiredRemoved={}, remaining={}, background={}\",\n                    expiredRemoved,\n                    RUNNING_JOB_DAG_JSON_CACHE.size(),\n                    background);\n        }\n    }\n\n    protected SeaTunnelServer getSeaTunnelServer(boolean shouldBeMaster) {\n        SeaTunnelServer seaTunnelServer = null;\n        try {\n            com.hazelcast.instance.impl.NodeExtension nodeExtension =","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/BaseService.java#L287-L323","documentation":"BaseService maintains an in-memory cache of running-job DAG JSON for the REST API. cleanupRunningJobDagCache() evicts entries when the cache exceeds max size or expires. When entries were evicted due to max size, a rate-limited warning (via RUNNING_JOB_DAG_CACHE_LAST_LOG_MS CAS) reports eviction statistics. It signals cache pressure — the cache max size was hit and oldest/expired entries were dropped; they are recomputable on demand.","triggerScenarios":"Number of running jobs whose DAG JSON is cached exceeds the configured RUNNING_JOB_DAG_JSON_CACHE max size; cleanup runs on access or from a background cleaner and evicts entries.","commonSituations":"Large clusters running many concurrent jobs; long-lived jobs keeping cache entries alive; REST metrics/dashboard endpoints polled frequently generating many cache entries.","solutions":["If job count is legitimately high, increase the cache max size configuration for the running-job DAG cache.","Treat as informational if evicted entries are stale/expired — correctness is unaffected (cache is recomputed).","Reduce REST polling frequency of DAG endpoints if load-driven.","Monitor remaining= count; if it stays at max, tune the cache sizing parameters."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// size the cache based on concurrent running-job count\nint runningJobs = jobMasterList.size();\nint recommendedMax = Math.max(configuredMax, runningJobs);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the running-job DAG cache max size at or above expected concurrent job count","Reduce REST dashboard polling frequency","Monitor eviction logs as a capacity signal","Rely on the cache being recomputable — treat evictions as non-fatal"],"tags":["cache","rest-api","zeta-engine"],"backgroundTag":null,"analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}