none
How to interpret AbsoluteTimeout value of Transaction RRS feed

  • Question

  • The Transaction.Current.internalTransaction.AbsoluteTimeout value is a long. What does this value represent?

    Or, is there a better way looking at the Transaction.Current to determine if a transaction has timed out?

    Wednesday, February 16, 2011 11:35 PM

All replies

  • Hi nottoc,

    Thanks for your post.

    I just find something relates to your question: http://social.msdn.microsoft.com/Forums/en/windowstransactionsprogramming/thread/de611ee7-0f6d-4bcd-8563-5293bd58f1ea

    I will do some research and get back to you as soon as possible, thanks for understanding.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 17, 2011 12:48 PM
    Moderator
  • We're running .Net 4.0. And we have a long series transactions that takes longer than the default 10 minute timeout. So, we adjusted the time out to 30 minutes. Within the method that retrieves the current connection we first check the state of the transaction. After a period of time (about 10 minutes or so) the state becomes transaction aborted.

    I want to know why it aborted. Thus my question of what does the absolute timeout represent. I was trying to determine if the transaction timed out.

    We're not having commit problems like in the thread you linked to.

    Thursday, February 17, 2011 3:19 PM
  • Hi nottoc,

    Thanks for your feedback.

    I got Transaction.Current.internalTransaction.AbsoluteTimeout from refector, the property is internal and is designed, I will help you to ask the represent of the property.

    How do you adjust the tansaction's timeout? I think this post is helpful: http://stackoverflow.com/questions/1348191/default-transaction-timeout

    you can still limit timeout by using the system.transaction/machineSettings/maxTimeout value. This is an administrative setting and can only be configured through the machine.config

    Thanks for understanding.

    Have a nice day.

     


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 18, 2011 9:10 AM
    Moderator
  • The time out is set thusly:

    Dim tspan As New TimeSpan(0, 30, 0)
    Using tran As New TransactionScope(TransactionScopeOption.Required, tspan)

    ... Do Database stuff ...

    End Using

    I'm looking at the AbsoluteTimeout value in the debugger.

    Friday, February 18, 2011 11:13 PM