Manage transaction logging for optimum server availability
This page describes how to manage transaction logging to optimize the availability of the appservers.
The transaction service writes information to the transaction log for every global transaction that involves two or more resources, or that is distributed across multiple servers. The transaction log is stored on disk and is used by the transaction service for recovery after a system or server crash. The transaction log for each appserver consists of multiple subdirectories and files held in a single directory. To change the directory that an appserver uses to store the transaction log, change the transaction log directory in the transaction service settings.
When a global transaction is completed, the information in the transaction log is no longer required, and the information is marked for deletion. The redundant information is garbage collected and intervals, and the space is reused by new transactions. The log files are created with a fixed size at server startup, so no further disk space allocation is required during the lifetime of the server.
If all the log space is in use when a transaction needs to save information, the transaction is rolled back and the message CWWTR0083W: The transaction log is full. Transaction rolled back. is reported to the system error log. No more transactions can commit until more log space is made available when existing active transactions complete.
The default disk space allocation for the transaction logs is 1M. For global transactions that involve only XA resources and that are either local to an appserver or are distributed between enterprise beans running in remote application servers, the default disk space allocation is suitable for peak workloads of up to 4000 concurrent two-phase commit transactions. For global transactions that involve Web Services Atomic Transaction (WS-AT) transactions or interoperable OTS transactions, the default disk space allocation is suitable for peak workloads of up to 250 concurrent two-phase commit transactions. For higher workloads, consider using a larger transaction log. To change the disk space allocation for the transaction log files, change the transaction log directory in the transaction service settings.
We can monitor the number of concurrent global transactions by using the performance monitoring counters for transactions. The "Global transaction commit time" counter is a measure of how long a transaction takes to complete and, therefore, how long the log is in use by a transaction. If this value is high, then transactions are taking a long time to complete, which can be due to resource manager or network failures. If we ensure that this value is low, the log is more efficiently used and unlikely to become full.
Use the following tasks to manage transaction logging to optimize the availability of the appservers:
- Set transaction aspects of servers for optimum availability. Use this task to configure the transaction properties for an appserver to help transactions to complete or recover more quickly.
- Moving a transaction log from one server to another Use this task if we have to move a transaction log between servers.
- Restarting an appserver on a different host Use this task to restart the appserver if we move a transaction log between hosts.
- Set transaction properties for an appserver Use this task to change the directory or the disk space allocation for the transaction log files.
Set transaction aspects of servers for optimum availability
Moving a transaction log from one server to another
Restarting an appserver on a different host
Related tasks
Set transaction properties for an appserver
Use the transaction service
Related
Transaction service settings