locked
System.Transactions and machine.config's maxTimeout

    Question

  • Hi all,
    I've just learned about the machine.config maxTimeout.  Our problem is that there is no way we can touch the machine.config file on our large group of client machines, which we do not control.  We have a Windows Forms app that uses application transactions.  For example, a transaction may be open when the user has popped-up one of our dialog forms.  He goes to get some coffee and chat with his co-worker about the cute new receptionist, comes back 15 minutes later, and bam -- no worky worky, because of the 10 minute default.

    Having perused the forum on this topic, it seems there really is no way around this besides editing machine.config.  But having thrown my use case out there, does maybe anybody have any ideas?  We're tempted to write our own transaction system just because of this.  Or find a ready-made third party replacement for System.Transactions.  Any ideas would be appreciated.

    Thanks,
    Bill
    Monday, August 18, 2008 11:58 AM

Answers

  •  

    Hi Bill, no, this is the only way to increase the maxTimeout.  The reason it is 10minutes (which some may think as actually pretty large) is that this means you can more or less lock your database (or other transactional resource) for 10minutes at a time.  This means that no other client will be able to access the rows of data (and perhaps the entire table) that is currently being modified by the transaction -- which is generally a bad thing to do.

     

    Our suggestion, regardless of what transaction system you use, would be to design short-lived transactions which are not entirely dependant on interactive UI tasks -- i.e. only start the transaction when the user hits Apply, not as soon as the dialog opens up if possible.

     

     

    Monday, August 18, 2008 2:56 PM
    Moderator

All replies

  •  

    Hi Bill, no, this is the only way to increase the maxTimeout.  The reason it is 10minutes (which some may think as actually pretty large) is that this means you can more or less lock your database (or other transactional resource) for 10minutes at a time.  This means that no other client will be able to access the rows of data (and perhaps the entire table) that is currently being modified by the transaction -- which is generally a bad thing to do.

     

    Our suggestion, regardless of what transaction system you use, would be to design short-lived transactions which are not entirely dependant on interactive UI tasks -- i.e. only start the transaction when the user hits Apply, not as soon as the dialog opens up if possible.

     

     

    Monday, August 18, 2008 2:56 PM
    Moderator
  • What about a client application that is doing a batch data conversion and needs transactions? It's a shame that we can't override this on an application by applciation basis within the app.config or web.config file.
    Wednesday, February 08, 2012 4:00 PM