Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

MAX_USER_LOG_ENTRY_BYTES

MAX_USER_LOGS <# of logs>

An optional limit for how many active transaction logs a transaction spans before it is aborted or abandoned. The default, ZERO, disables the check for long transactions.

When specified, MAX_USER_LOGS takes as its argument the maximum number of logs a transaction may span. If a transaction exceeds the limit, an attempt is made to abort the transaction. If the transaction cannot be aborted (consider the case where an abort would cause the server to fail), the transaction is abandoned. This means the client thread will lose its connection to the server, and the application may receive errors ARQS_ERR (127) or ARSP_ERR (128). There is no guarantee that a transaction will not span more logs than the specified maximum, however, the transaction will end within a reasonable number of logs.

If the transaction is aborted, then the next call by the client will return error MLAB_ERR (821) to indicate the operation was not completed and the pending transaction has been aborted. (See the end note for a special case of this error condition.) A message of the following form will be made in CTSTATUS.FCS:

Sun Dec 03 08:53:21 2006

- User# 00011 Transaction aborted at ct_mul_abandon1 for user# 9: 821

If the transaction is abandoned (that is, no explicit abort written in the log), then the client will be disconnected from the server. CTSTATUS.FCS entries such as the following reflect logs growing from a transaction that is pending, then the detection of the long transaction, then the eventual abandonment:

Sun Dec 03 09:53:42 2006

- User# 00012 The number of active log files increased to: 5

Sun Dec 03 09:53:42 2006

- User# 00012 Transaction (started in log 1) still pending.

User# 11 |GUEST||

Sun Dec 03 09:53:55 2006

- User# 00012 The number of active log files increased to: 6

Sun Dec 03 09:53:55 2006

- User# 00012 Abandoned Transaction

Sun Dec 03 09:54:10 2006

- User# 00012 The number of active log files increased to: 7

Sun Dec 03 09:54:10 2006

- User# 00012 Abandoned Transaction2

Sun Dec 03 09:54:10 2006

- User# 00012 Abandoned transaction kill request posted against user #11

|GUEST||

Sun Dec 03 09:54:10 2006

- User# 00011 ctntio: send error - O11 bytes=0 pErr=127

|GUEST||: 168

Sun Dec 03 09:54:25 2006

- User# 00012 The number of active log files decreased to: 4

The number of logs continued to grow, and then shrink, as reflected in the above excerpt because in addition to a transaction sleeping on a blocked lock, another unrelated application was continuing to add records to its files and corresponding entries in the transaction logs.

Note: In some rare situations error TRAB_COD (-823) can be returned instead of MLAB_ERR. This indicates the requested operation was completed before the abort actually took place. Usually, this is the same condition as an MLAB_ERR, as the transaction is aborted. In practice, the TRAB_COD should be rare.

Default: 0

TOCIndex