{"record":{"id":"9c57337449c09978","repo":"prestodb/presto","slug":"out-of-spill-space","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/FileSingleStreamSpillerFactory.java","lineNumber":172,"sourceCode":"            spillCipher = Optional.of(new AesSpillCipher());\n        }\n        PagesSerde serde = serdeFactory.createPagesSerdeForSpill(spillCipher);\n        return new FileSingleStreamSpiller(serde, executor, getNextSpillPath(), spillerStats, spillContext, memoryContext, spillCipher);\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","sourceCodeStart":154,"sourceCodeEnd":188,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/spiller/FileSingleStreamSpillerFactory.java#L154-L188","documentation":"getNextSpillPath() round-robins over configured spill paths, picking the first one with enough free disk space. When the configured spillPaths list is completely empty there is nothing to select, so it throws PrestoException with code OUT_OF_SPILL_SPACE and message 'No spill paths configured'. This is a configuration error surfaced as a spill-space failure.","triggerScenarios":"Calling FileSingleStreamSpillerFactory.create() (which invokes getNextSpillPath) when the spiller was built with an empty spill-paths collection — i.e. no spill directories were configured at all.","commonSituations":"etc/spiller.properties or config.properties missing spiller-spill-path entry while spill-enabled=true; config loader trimming/ignoring an empty value; building the factory programmatically with an empty list; dependency-injection wiring that supplied a default empty set.","solutions":["Configure at least one spill directory: add experimental.spiller-spill-path=<dir> (comma-separated for multiple) to config.properties and restart the coordinator/worker.","If spill is not wanted, disable it (experimental.spill-enabled=false) instead of leaving spill enabled with no paths.","Inspect how the config is loaded (SpillerConfig) to confirm the property key name matches your Presto version — property names changed across releases.","Verify with jmx/CLI that each worker got the updated config; spill paths are per-node, so a worker with empty paths fails only its own queries."],"exampleFix":"// before (config.properties, spill enabled but no path)\nexperimental.spill-enabled=true\n\n// after\nexperimental.spill-enabled=true\nexperimental.spiller-spill-path=/var/spill,/mnt/spill2","handlingStrategy":"validation","validationCode":"// at config load time\nList<Path> paths = spillerConfig.getSpillPaths();\nif (spillerConfig.isSpillEnabled() && (paths == null || paths.isEmpty())) {\n    throw new IllegalStateException(\"spill enabled but no experimental.spiller-spill-path configured\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    spillerFactory.create(sources, operatorContext);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == OUT_OF_SPILL_SPACE.toErrorCode().getCode()) {\n        // fail query with clear config guidance\n    }\n    throw e;\n}","preventionTips":["Never enable spill without also configuring at least one spill path","Use config-management templates that assert both properties together","Diff worker configs across the cluster to catch missing properties"],"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"}