prestodb/presto · critical · PrestoException

OUT_OF_SPILL_SPACE

OUT_OF_SPILL_SPACE

Error message

No spill paths configured

What it means

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.

Source

Thrown at presto-main-base/src/main/java/com/facebook/presto/spiller/LocalTempStorage.java:195

        }
        catch (IOException e) {
            log.warn(e, "Error cleaning spill files");
        }
    }

    private synchronized Path getNextSpillPath()
    {
        int spillPathsCount = spillPaths.size();
        for (int i = 0; i < spillPathsCount; ++i) {
            int pathIndex = (roundRobinIndex + i) % spillPathsCount;
            Path path = spillPaths.get(pathIndex);
            if (hasEnoughDiskSpace(path)) {
                roundRobinIndex = (roundRobinIndex + i + 1) % spillPathsCount;
                return path;
            }
        }
        if (spillPaths.isEmpty()) {
            throw new PrestoException(OUT_OF_SPILL_SPACE, "No spill paths configured");
        }
        throw new PrestoException(OUT_OF_SPILL_SPACE, "No free space available for spill");
    }

    private boolean hasEnoughDiskSpace(Path path)
    {
        try {
            FileStore fileStore = getFileStore(path);
            return fileStore.getUsableSpace() > fileStore.getTotalSpace() * (1.0 - maxUsedSpaceThreshold);
        }
        catch (IOException e) {
            throw new PrestoException(OUT_OF_SPILL_SPACE, "Cannot determine free space for spill", e);
        }
    }

    public static class LocalTempStorageHandle
            implements TempStorageHandle
    {

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Add at least one writable spill directory via experimental.spiller-spill-path in config.properties and restart the node.
  2. Verify every worker has the property set — a single misconfigured node fails any query whose plan uses it.
  3. Alternatively disable spill entirely (experimental.spill-enabled=false) if disk spilling is not intended.
  4. Confirm property key spelling against your Presto version's SpillerConfig class.

Example fix

// before (worker config.properties)
# no spill path

// after
experimental.spiller-spill-path=/var/spill
Defensive patterns

Strategy: validation

Validate before calling

if (spillEnabled && (spillPaths == null || spillPaths.isEmpty())) {
    throw new IllegalStateException("Spill enabled but no spill paths configured; set experimental.spiller-spill-path");
}

Try / catch

catch (PrestoException e) {
    if ("OUT_OF_SPILL_SPACE".equals(e.getErrorCode().getName())) {
        // check node config for spill paths before retrying
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling LocalTempStorage.path() or getRootDirectoryHandle() (thus getNextSpillPath) while the storage instance was constructed with zero spill paths configured.

Common situations: 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.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/3d709a6c70fc8190. Report an issue: GitHub.