| Previous | Next |
| hrFileClose | hrTooManyIO |
hrOutOfThreads
State represented by this code
For hrOutOfThreads, a correct handler first decides whether the value is success, warning, or failure, then examines the documented outputs. The decisive boundary is ESE could not start a worker thread needed by the requested operation.
The stored Value is 0xC8000067 (negative JET error -103; -103). The HRESULT carries failure severity, so output state must be treated according to the individual API contract. Current ESE documentation uses JET_errOutOfThreads for the corresponding published JET condition.
The first useful distinction is that this is not a generic busy indication like hrTooManyIO and not necessarily an ESE memory-cache limit. Start by measure process thread count, system commit, thread creation failures, stack reservation, and the workload phase requesting the worker. That separates a reproducible incident from a later generic cleanup or service error.
Data for a reproducible incident
Preserve the first result before retries, cleanup, service restart, or file replacement changes the evidence. The diagnostic record should identify the exact API phase and the owner of every handle or artifact involved.
- Code-specific observation: measure process thread count, system commit, thread creation failures, stack reservation, and the workload phase requesting the worker.
- Concurrency at first failure: record it together with this result and the timestamp of the first occurrence.
- Win32 status and file/operation: record it together with this result and the timestamp of the first occurrence.
- Thread, handle, and I/O counts: record it together with this result and the timestamp of the first occurrence.
- System commit and volume state: record it together with this result and the timestamp of the first occurrence.
Use hashes, lengths, IDs, generation numbers, and redacted samples instead of copying directory contents or sensitive database values into routine logs. For this it investigation, a complete provenance chain is often more useful than a second automatic retry.
Objects and state involved
| Diagnostic layer | operating-system file, thread, and asynchronous-I/O resources used by ESE |
|---|---|
| Relevant API surface | database/log file I/O, worker creation, backup reads, and background tasks |
| Code-specific boundary | ESE could not start a worker thread needed by the requested operation |
| Narrow corrective direction | remove thread leaks or excessive concurrency and retry only after thread capacity is demonstrably available |
The first lower-level Win32 error is more useful than later cascading ESE failures., resource exhaustion should be measured at the moment of failure, before retries alter counts.
Actions that can make diagnosis worse
- do not discard a close or flush error during cleanup.
- do not create unbounded retries under resource pressure.
- do not discard the first lower-level Win32, RPC, or JET result merely because a later cleanup call returned a more familiar error.
Nearby ESE or AD backup states
It specifically means that this is not a generic busy indication like hrTooManyIO and not necessarily an ESE memory-cache limit. Related values below can appear in the same workflow but require a different response:
hrFileClose | ESE could not complete the operating-system close of a database, log, temporary, or backup file |
|---|---|
hrTooManyIO | the engine reached its outstanding-I/O throttle and refused to queue more storage work |
hrBadLogSignature | a transaction log header signature does not match the expected log sequence |
Keep the original constant and hexadecimal value in telemetry. Replacing it with “backup failed” or “database warning” removes the state information needed to select the next legal API call.
Next actions
- Record it,
0xC8000067, the API name, the current phase, and all live context or file owners. - Verify the decisive condition by measure process thread count, system commit, thread creation failures, stack reservation, and the workload phase requesting the worker.
- Apply only the narrow correction: remove thread leaks or excessive concurrency and retry only after thread capacity is demonstrably available.
- After it, recreate any context invalidated by the failure; do not carry stale HBC, cursor, file, or restore-map state into the retry.
- repeat the smallest non-destructive test that reaches the same boundary, then verify both the return value and the resulting file, cursor, backup, or database state.
Acceptance criteria for a fix
A useful regression test for this HRESULT should force the condition “ESE could not start a worker thread needed by the requested operation”, call one documented API transition, and assert the exact HRESULT. The corrected the case should change only the decisive precondition and should verify cleanup as well as the primary output. For the result backup or restore path, also prove that the resulting set can be enumerated and that no file handle or context remains active after finalization.
Technical references
- ESE error-code table — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to it.
- ESE files
- Open-source ESE implementation
- Microsoft JET_ERR enumeration
Looking for a different code? Search another status or error code.
