prestodb/presto · error · IllegalArgumentException
Unrecognized memory pool:
Error message
Unrecognized memory pool:
What it means
ResourceManagerClusterStateProvider aggregates per-node memory usage by classifying each reported memory pool as GENERAL_POOL or RESERVED_POOL. When a node reports a pool ID matching neither, getClusterMemoryPoolInfoInternal throws IllegalArgumentException. This indicates coordinator/resource-manager configuration mismatch (e.g. a custom pool or outdated node config).
Source
Thrown at presto-main-base/src/main/java/com/facebook/presto/resourcemanager/ResourceManagerClusterStateProvider.java:315
.collect(toImmutableList());
int queriesAssignedToGeneralPool = 0;
int queriesAssignedToReservedPool = 0;
Query largestGeneralPoolQuery = null;
for (CoordinatorQueriesState nodeQueryState : nodeQueryStates.values()) {
for (Query query : nodeQueryState.getActiveQueries()) {
MemoryPoolId memoryPool = query.getBasicQueryInfo().getMemoryPool();
if (GENERAL_POOL.equals(memoryPool)) {
queriesAssignedToGeneralPool = Math.incrementExact(queriesAssignedToGeneralPool);
if (!resourceOvercommit(query.getBasicQueryInfo().getSession().toSession(sessionPropertyManager))) {
largestGeneralPoolQuery = getLargestMemoryQuery(Optional.ofNullable(largestGeneralPoolQuery), query);
}
}
else if (RESERVED_POOL.equals(memoryPool)) {
queriesAssignedToReservedPool = Math.incrementExact(queriesAssignedToReservedPool);
}
else {
throw new IllegalArgumentException("Unrecognized memory pool: " + memoryPool);
}
}
}
List<QueryId> runningQueries = nodeQueryStates.values().stream()
.map(CoordinatorQueriesState::getActiveQueries)
.flatMap(Collection::stream)
.filter(query -> query.getBasicQueryInfo().getState() == RUNNING)
.map(Query::getQueryId)
.collect(toImmutableList());
ImmutableMap.Builder<MemoryPoolId, ClusterMemoryPoolInfo> memoryPoolInfos = ImmutableMap.builder();
ClusterMemoryPool pool = new ClusterMemoryPool(GENERAL_POOL);
pool.update(memoryInfos, queriesAssignedToGeneralPool);
ClusterMemoryPoolInfo clusterInfo = pool.getClusterInfo(Optional.ofNullable(largestGeneralPoolQuery).map(Query::getQueryId), Optional.ofNullable(runningQueries));
memoryPoolInfos.put(GENERAL_POOL, clusterInfo);
if (isReservedPoolEnabled) {
pool = new ClusterMemoryPool(RESERVED_POOL);View on GitHub (pinned to 55bb57d202)
Solutions
- Align memory pool configuration across all coordinators, workers, and the resource manager (query.max-memory-per-node / memory-pool settings).
- Restart/redeploy mismatched nodes so every worker reports only GENERAL_POOL and RESERVED_POOL.
- If custom pools are in use, update ResourceManagerClusterStateProvider handling to recognize them.
- Check for version skew: upgrade all nodes to the same Presto version.
Example fix
// before (worker config.properties, mismatched) memory.pools=custom // after memory.pools=general,reserved
Defensive patterns
Strategy: validation
Validate before calling
# pre-deploy check: every node's config reports only general/reserved pools grep -E 'memory' config.properties # ensure no custom pools unless the build supports them
Try / catch
try {
poolInfo = provider.getClusterMemoryPoolInfo();
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unrecognized memory pool:")) {
log.error("Node reports unknown pool {}; fix memory pool config cluster-wide", e.getMessage());
}
throw e;
} Prevention
- Keep memory-pool configuration identical across all workers, coordinators, and the resource manager.
- Avoid mixed Presto versions during rolling upgrades; drain old nodes.
- Only use custom memory pools if your build's resource manager recognizes them.
- Monitor node heartbeats after config changes to catch stale nodes early.
When it happens
Trigger: A Presto node reports a memory pool whose ID is neither the configured general pool nor the reserved pool — typically after changing memory pool configuration on coordinators/workers inconsistently, or with custom pool plugins.
Common situations: Mixed-version clusters during rolling upgrades; one worker with a custom memory-pool config while the resource manager expects only default pools; stale node metadata after config changes.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/ecd3a40392f95d45.
Report an issue: GitHub.