Error:

10 minute limit on distributed transactions

Running a distributed transaction on Windows XP SP2 that exceeds 10 minutes will cause the transaction to rollback with an ORA-24761 error. The error message is:

Unable to get error message (6107) (0)

The time out defined for the component in Component Services does not matter.

Solution:

If no timeout is specified in the TransactionScope constructor, a transaction has 1 min timeout by default.

This timeout can be overridden in the app.config (or web.config ) by adding following lines.

<system.transactions>
<defaultSettings timeout=”00:30:00″ />
</system.transactions>

Anyway, to prevent too long transactions, a maximum timeout can be specified at machine.config level by setting

<system.transactions>
<machineSettings maxTimeout=”00:30:00″ />
</system.transactions>

If this is not specified explicitely, the maxTimeout has a default value of 10 minutes.

So at the end my code looks like:


try
{
// set no timeout in the constructor
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
{
}
}
catch
{}

Advertisements