{"record":{"id":"3d709a6c70fc8190","repo":"prestodb/presto","slug":"out-of-spill-space-3d709a","errorCode":"OUT_OF_SPILL_SPACE","errorMessage":"No spill paths configured","messagePattern":"No spill paths configured","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"critical","filePath":"presto-main-base/src/main/java/com/facebook/presto/spiller/LocalTempStorage.java","lineNumber":195,"sourceCode":"        }\n        catch (IOException e) {\n            log.warn(e, \"Error cleaning spill files\");\n        }\n    }\n\n    private synchronized Path getNextSpillPath()\n    {\n        int spillPathsCount = spillPaths.size();\n        for (int i = 0; i < spillPathsCount; ++i) {\n            int pathIndex = (roundRobinIndex + i) % spillPathsCount;\n            Path path = spillPaths.get(pathIndex);\n            if (hasEnoughDiskSpace(path)) {\n                roundRobinIndex = (roundRobinIndex + i + 1) % spillPathsCount;\n                return path;\n            }\n        }\n        if (spillPaths.isEmpty()) {\n            throw new PrestoException(OUT_OF_SPILL_SPACE, \"No spill paths configured\");\n        }\n        throw new PrestoException(OUT_OF_SPILL_SPACE, \"No free space available for spill\");\n    }\n\n    private boolean hasEnoughDiskSpace(Path path)\n    {\n        try {\n            FileStore fileStore = getFileStore(path);\n            return fileStore.getUsableSpace() > fileStore.getTotalSpace() * (1.0 - maxUsedSpaceThreshold);\n        }\n        catch (IOException e) {\n            throw new PrestoException(OUT_OF_SPILL_SPACE, \"Cannot determine free space for spill\", e);\n        }\n    }\n\n    public static class LocalTempStorageHandle\n            implements TempStorageHandle\n    {","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/spiller/LocalTempStorage.java#L177-L213","documentation":"LocalTempStorage.getNextSpillPath() selects a spill directory round-robin only if it has enough free space. When the spillPaths list is empty there is no candidate to evaluate, so it throws PrestoException OUT_OF_SPILL_SPACE 'No spill paths configured'. Called by path() and getRootDirectoryHandle(), i.e. whenever any spill storage handle is needed.","triggerScenarios":"Calling LocalTempStorage.path() or getRootDirectoryHandle() (thus getNextSpillPath) while the storage instance was constructed with zero spill paths configured.","commonSituations":"Missing or empty experimental.spiller-spill-path / spiller-spill-path property on some workers; config template without the property deployed to new nodes; programmatic LocalTempStorage construction with an empty list.","solutions":["Add at least one writable spill directory via experimental.spiller-spill-path in config.properties and restart the node.","Verify every worker has the property set — a single misconfigured node fails any query whose plan uses it.","Alternatively disable spill entirely (experimental.spill-enabled=false) if disk spilling is not intended.","Confirm property key spelling against your Presto version's SpillerConfig class."],"exampleFix":"// before (worker config.properties)\n# no spill path\n\n// after\nexperimental.spiller-spill-path=/var/spill","handlingStrategy":"validation","validationCode":"if (spillEnabled && (spillPaths == null || spillPaths.isEmpty())) {\n    throw new IllegalStateException(\"Spill enabled but no spill paths configured; set experimental.spiller-spill-path\");\n}","typeGuard":null,"tryCatchPattern":"catch (PrestoException e) {\n    if (\"OUT_OF_SPILL_SPACE\".equals(e.getErrorCode().getName())) {\n        // check node config for spill paths before retrying\n    }\n    throw e;\n}","preventionTips":["Assert spill-path presence in deployment validation scripts","Use identical config templates across all workers","Disable spill explicitly where spill storage is not provisioned"],"tags":["spill","configuration","out-of-space","presto"],"backgroundTag":"no-spill-paths-configured","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}