prestodb/presto · error · PrestoException
GENERIC_INTERNAL_ERROR
GENERIC_INTERNAL_ERROR
Error message
Failed to create spill sink
What it means
Runtime error from TempStorageSingleStreamSpiller: the underlying temp-storage engine failed to open a sink for spilling (e.g. the temp store is unavailable or its storage is full/failing). The spill subsystem cannot persist pages for this query, so the error surfaces to the query.
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/spiller/TempStorageSingleStreamSpiller.java:116
checkState(!spillCipher.isPresent() || !spillCipher.get().isDestroyed(), "spillCipher is already destroyed");
this.spillCipher.ifPresent(cipher -> closer.register(cipher::destroy));
Session session = spillContext.getSession();
this.tempDataOperationContext = new TempDataOperationContext(
session.getSource(),
session.getQueryId().getId(),
session.getClientInfo(),
Optional.of(session.getClientTags()),
session.getIdentity());
this.maxBufferSizeInBytes = toIntExact(getTempStorageSpillerBufferSize(session).toBytes());
try {
dataSink = tempStorage.create(tempDataOperationContext);
memoryContext.setBytes(dataSink.getRetainedSizeInBytes());
}
catch (IOException e) {
throw new PrestoException(GENERIC_INTERNAL_ERROR, "Failed to create spill sink", e);
}
}
@Override
public ListenableFuture<?> spill(Iterator<Page> pageIterator)
{
requireNonNull(pageIterator, "pageIterator is null");
checkNoSpillInProgress();
spillInProgress = executor.submit(() -> writePages(pageIterator));
return spillInProgress;
}
@Override
public long getSpilledPagesInMemorySize()
{
return spilledPagesInMemorySize;
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Verify the temp storage (e.g. temp-storage.data-manager-shard) locations are writable and have space
- Check worker disk health and restart failing temp storage
- Reduce query memory pressure (smaller partitions) to avoid spilling entirely
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/spiller/TempStorageSingleStreamSpiller.java:116 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/5887f5acc9897a8b.
Report an issue: GitHub.