prestodb/presto · error · PrestoException

SPOOLING_STORAGE_ERROR

SPOOLING_STORAGE_ERROR

Error message

Failed to read file from TempStorage

What it means

I/O failure inside getPagesFromStorage while a client fetches pages that were spilled to TempStorage by the spooling output buffer: reading a spooled file backing a handle failed, so buffered result pages cannot be returned to the client.

Source

Thrown at presto-main-base/src/main/java/com/facebook/presto/execution/buffer/SpoolingOutputBuffer.java:418

                bytes += page.getRetainedSizeInBytes();

                if (pageCount != 0 && bytes > maxBytes) {
                    getTracker.update(bytesRead, pageCount);
                    return immediateFuture(resultBuilder.build());
                }
                resultBuilder.add(page);
                pageCount++;
            }

            getTracker.update(bytes, pageCount);

            if (!handleIterator.hasNext()) {
                return immediateFuture(resultBuilder.build());
            }
            return transformAsync(handleIterator.next().getHandleFuture(), input -> getPagesFromStorage(resultBuilder, handleIterator, input, getTracker), executor);
        }
        catch (IOException e) {
            throw new PrestoException(SPOOLING_STORAGE_ERROR, "Failed to read file from TempStorage", e);
        }
    }

    private List<SerializedPage> getPagesFromMemory(long startSequenceId, GetTracker getTracker)
    {
        checkArgument(startSequenceId == currentMemorySequenceId.get(), "Invalid startSequenceId for memory pages");
        checkArgument(getTracker.bytes < getTracker.maxSizeInBytes, "bytesRead is greater than maxSize");

        ImmutableList.Builder<SerializedPage> result = ImmutableList.builder();
        List<SerializedPage> pages = getTracker.getMemoryPages();
        long maxBytes = getTracker.maxSizeInBytes;
        long bytes = 0;
        long pageCount = 0;

        for (SerializedPage page : pages) {
            bytes += page.getRetainedSizeInBytes();
            if (pageCount != 0 && bytes > maxBytes) {
                break;

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Retry the query; transient temp-storage failures usually clear up
  2. Check TempStorage health and disk space on the coordinator and workers
  3. Inspect coordinator logs for the underlying IOException to identify the failing spooled file
  4. If persistent, disable or reconfigure spooling output buffers and rerun
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/execution/buffer/SpoolingOutputBuffer.java:418 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/c65c577dcaed7c9a. Report an issue: GitHub.