Qpid java Broker Transaction TimeoutsPage added by Andrew KennedyTransaction Timeouts User GuideIntroductionQpid 2.6.0.6 includes a new feature to allow deployers to configure transaction timeout thresholds, and the associated actions to perform on crossing of the specified threshold. The transaction timeout mechanism is used to control broker resources when clients producing messages using transactional sessions hang or otherwise become unresponsive. Users can choose to configure a Warn threshold, after which the identified transaction should be logged as a 'WARN' level alert as well as (importantly) a Close threshold after which the transaction and the connection it applies to will be closed. This feature is particularly useful in environments where the owner of the broker does not have full control over the implementation of clients, such as in a shared services deployment. The following section provide more details on this feature and its use. PurposeThis feature has been introduced to address the scenario where an open transaction can include an open transaction on the BDB store. This can have undesirable consequences, preventing the BDB store cleaning thread from rolling forward data efficiently and can result in a rapidly growing store bound only by available disk space. ScopeNote that only MessageProducer clients will be affected by a transaction timeout, since transaction lifespan on a consumer only spans the execution of the commit and there is no scope for a long-lived transaction to arise. It is also important to note that the transaction timeout mechanism is purely a JMS transaction timeout, and unrelated to any other timeouts in the Qpid client library and will have no impact on any RDBMS your application may utilise. EffectFull details of configuration options are provided in the sections that follow. This section gives a brief overview of what the Transaction Timeout feature can do. Broker Logging and Connection CloseWhen the 'openWarn' or 'idleWarn' specified threshold is exceeded, the broker will log a 'WARN' level alert with details of the connection and channel on which the threshold has been exceeded, along with the age of the transaction. When the 'openClose' or 'idelClose' specified threshold value is exceeded, the broker will throw an exception back to the client on its exception listener, log the action and then close the connection. The example broker log output shown below is where the Warn threshold specified is lower than the Close threshold and the broker therefore logs the idle transaction 3 times before the close threshold is triggered and the connection closed out. INFO [qpid.message] MESSAGE [Queue-housekeeping-test][con:1(guest@anonymous(29494388)/test)/ch:2] CHN-1008 : Idle Transaction : 13,116 ms WARN [apache.qpid.server.AMQChannel] IDLE TRANSACTION ALERT [con:1(guest@anonymous(29494388)/test)/ch:2] 13116 ms INFO [qpid.message] MESSAGE [Queue-housekeeping-test][con:1(guest@anonymous(29494388)/test)/ch:2] CHN-1008 : Idle Transaction : 14,116 ms WARN [apache.qpid.server.AMQChannel] IDLE TRANSACTION ALERT [con:1(guest@anonymous(29494388)/test)/ch:2] 14116 ms INFO [qpid.message] MESSAGE [Queue-housekeeping-test][con:1(guest@anonymous(29494388)/test)/ch:2] CHN-1008 : Idle Transaction : 15,118 ms WARN [apache.qpid.server.AMQChannel] IDLE TRANSACTION ALERT [con:1(guest@anonymous(29494388)/test)/ch:2] 15118 ms INFO [qpid.server.protocol.AMQProtocolSession] Closing connection due to: org.apache.qpid.AMQConnectionException: Idle transaction timed out [error code 506: resource error] INFO [qpid.message] MESSAGE [Queue-housekeeping-test][con:1(guest@anonymous(29494388)/test)/ch:2] CHN-1003 : Close
The virtualhosts configuration is shown below, and must occur inside the //virtualhosts/virtualhost/name/ elements: virtualhosts.xml
<transactionTimeout>
<openWarn>10000</openWarn>
<openClose>20000</openClose>
<idleWarn>5000</idleWarn>
<idleClose>15000</idleClose>
</transactionTimeout>
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Qpid > Qpid java Broker Transaction Timeouts confluence
