views:

326

answers:

1

I've noticed that very simple distributed transactions take a good amount of time (3-4s) to complete on a first run. But if the same transaction scope is called again, it's much faster (30ms). It seems like MSDTC sort of goes to sleep after an hour. After the hour has passed, the next transaction to run will take 3-4s.

I don't expect much traffic on the site, so it's likely that many hours could pass between individual transactions.

I thought possibly this was due to the MSDTC service being set to start manually, but I've made sure that the MSDTC services are both running automatically.

Guessing there's a registry setting somewhere, but I had no luck finding anything in MSDN.

Thank you!

+1  A: 

MSDTC runs COM+ components to handle transactions and after 20 minutes (I believe the default) the components are unloaded from memory. The slow down you are seeing on the first transaction is the environment spinning up and loading things into memory.

Kevin