Skip to end of metadata
Go to start of metadata


The goal of the automated transaction and session killers is to protect database resources against unintentionally long-running operations that may degrade database performance or availability. Each of these are configurable and can be completely disabled if desired.  

The automated transaction killers will cancel transactions that exceed the specified thresholds. Each transaction killer uses global variables to specify the threshold conditions that should be exceeded before transactions are killed.

Since these checks are only run periodically, the result is that transactions may exceed the threshold for some time before being killed.

Example: If the global variable is set to kill a transaction after 20 seconds of being idle and is run every 30 seconds, the transaction may not be killed until the 49 second mark.

Capacity Transaction and Session Killers (trxshoot)

The capacity killer (trxshoot) will cancel transactions when the amount of storage space falls below the specified thresholds. The global variables to control this are as follows: 

Global VariableDescriptionDefault Value
trxshoot_disk_min_pctKill the oldest transaction when available disk space goes below this percentage and available undo space goes below trxshoot_undo_min_pct.5
trxshoot_undo_min_pct Kill the oldest transaction when available undo space goes below this percentage and available disk space goes below trxshoot_disk_min_pct.2

If both of the thresholds are met, trxshoot is activated, the transaction with the oldest xid will be killed, and an error will be returned to the requesting application.

Time-based Session Killer (session_idle_kill)

The process to kill long-running transactions by killing their associated session is intended to prevent unintentional ill effects on a cluster due to long running sessions. The variables that control when session_idle_kill is called are as follows:

Global VariableDescription

Default Value

idle_trx_timeout_sMaximum allowed age for idle transactions. Specify 0 for no timeout. This killer will be activated if the time between transactions within a session exceeds the threshold. This occurs mainly due to sessions that have been left open unintentionally.120
trx_timeout_sMaximum allowed age for transactions. Specify 0 for no timeout. The session killer will be activated if the total transaction age exceeds this threshold, whether the transaction is actively doing work or not. The age of active transactions can be found by querying system.sessions.0 
write_trx_timeout_sMaximum allowed age for write transactions. Specify 0 for no timeout. The session killer will be activated if the total time for a write transaction exceeds this threshold. When enabling this session killer, the value for write_trx_timeout_s should be set to a lower value than trx_timeout_s.0

Please note that when session_idle_kill is invoked, it will kill the entire session containing the individual transaction.

Network Timeout Killer

The network timeout killer detects and closes idle sessions to unresponsive clients. The Network Timeout killers close sessions as opposed to transactions. 

Global VariableDescriptionDefault Value
net_write_timeoutThe number of seconds that Xpand will wait for a client to read data.60
wait_timeoutThe number of seconds the Xpand waits for activity on a connection before closing it.28800
  • No labels