pingcap/tidb · error
Out of Unknown Resource Quota!
Error message
Out of Unknown Resource Quota!
What it means
The default arm of the same switch in globalPanicOnExceed (pkg/executor/select.go): the triggered tracker's Label() is none of GlobalStorage/GlobalMemory/GlobalAnalyzeMemory, so TiDB cannot name the resource and panics with 'Out of Unknown Resource Quota!'. Reaching it means a quota-exceeded action was attached to a global tracker that forgot to set a recognized label - an internal invariant break, not a user workload property.
Source
Thrown at pkg/executor/select.go:182
}
// Action panics when storage usage exceeds storage quota.
func (a *globalPanicOnExceed) Action(t *memory.Tracker) {
a.mutex.Lock()
defer a.mutex.Unlock()
msg := ""
switch t.Label() {
case memory.LabelForGlobalStorage:
msg = globalPanicStorageExceed
case memory.LabelForGlobalMemory:
msg = globalPanicMemoryExceed
case memory.LabelForGlobalAnalyzeMemory:
msg = globalPanicAnalyzeMemoryExceed
default:
msg = "Out of Unknown Resource Quota!"
}
// TODO(hawkingrei): should return error instead.
panic(msg)
}
// GetPriority get the priority of the Action
func (*globalPanicOnExceed) GetPriority() int64 {
return memory.DefPanicPriority
}
// SelectLockExec represents a select lock executor.
// It is built from the "SELECT .. FOR UPDATE" or the "SELECT .. LOCK IN SHARE MODE" statement.
// For "SELECT .. FOR UPDATE" statement, it locks every row key from source Executor.
// After the execution, the keys are buffered in transaction, and will be sent to KV
// when doing commit. If there is any key already locked by another transaction,
// the transaction will rollback and retry.
type SelectLockExec struct {
exec.BaseExecutor
Lock *ast.SelectLockInfo
keys []kv.KeyView on GitHub (pinned to d01f9615c1)
Solutions
- Upgrade to a patched TiDB version where every global quota tracker sets a recognized label.
- Collect the panic stack (it identifies the tracker) and report it at github.com/pingcap/tidb.
- As a stopgap, relax global memory/storage quotas so no tracker hits the panic action.
Defensive patterns
Strategy: retry
Try / catch
// this panic indicates an internal bug; catch at the driver level, record the
// stack, and restart/reconnect the session - no query-level fix exists
if strings.Contains(err.Error(), "Out of Unknown Resource Quota!") {
log.Stack(err) // report upstream; retry on a fresh connection Prevention
- Run supported GA TiDB versions; avoid nightlies for production.
- Keep global quotas generous enough that trackers never reach the panic action.
- Capture full stacks of such panics for the bug report.
When it happens
Trigger: Any global tracker with a missing/unmapped label reaching its quota and running the panic action: essentially only when new TiDB code registers a tracker without LabelForGlobal* or an old binary loads mismatched tracker state. No supported user configuration produces it.
Common situations: Nightly or early releases where a new global quota shipped without a label case; plugins/experimental features registering global trackers; essentially never in supported GA versions.
Related errors
- Out Of Global Memory Limit!
- Out Of Global Analyze Memory Limit!
- Out Of Quota For Local Temporary Space!
- fail to create iterator
- TiFlash does not support vector index with pedicates
AI-assisted analysis of pingcap/tidb@d01f9615c1 (2026-08-15).
Data as JSON: /api/errors/4c25c2d041968d98.
Report an issue: GitHub.