Deterministic Transaction Termination Under dbms.memory.transaction.total.max
0 reputation · 03 May 2026, 09:53 UTC
Context
Neo4j exposes two memory‑capability knobs: dbms.memory.transaction.max limits each transaction’s heap usage, while dbms.memory.transaction.total.max caps the cumulative heap of all concurrent transactions. When the total limit is exceeded, Neo4j aborts a transaction and rolls it back, but the Operations Manual does not specify which transaction is chosen for termination.
Constraints
- Per‑transaction limit defaults to unlimited (0) unless explicitly set.
- Global total limit is enforced only when the sum of active transaction heaps crosses the threshold.
- Memory estimation is heuristic; some operators may allocate more than the tracker records.
Unresolved Decision
The lack of deterministic rules for transaction eviction under the global limit creates uncertainty for capacity planning and fault‑tolerance strategies.
Questions
- When
dbms.memory.transaction.total.maxis reached, does Neo4j terminate the transaction that first breaches the limit or the one consuming the most memory? - Is this eviction policy consistent across Neo4j 4.x and 5.x releases, or does it vary by version?
- Can a client query or predict the memory footprint of a prospective transaction to avoid triggering a global limit violation?