views:

75

answers:

0

This is continuation of http://stackoverflow.com/questions/3844327/timeout-exception-when-timeout-set-to-infinite-time (and I also see unanswered http://stackoverflow.com/questions/3752440/sqlconnection-and-transactionscope-timeout question).

I am using CastleProject ActiveRecord over NHibernate, C# 3.5. I have multiple subsequent inserts to a database within TransactionScope. One of them (random, different each time) fails with TimeoutException. Whichever timeout I set in my config file (10 hours), this does not matter. If I do not use transaction scope, it work (but too slow). It seems, NHibernate transaction has default timeout 30 second and is not affected by hibernate.command_timeout value.

Is it correct? How to overcome this?