title: Database transaction timeout problem
body: <p>I have been experiencing an error that I believe is caused by the database timing out due to a large amount of data being processed and read to the database.</p>
  
  <p>I keep getting this error message:</p>
  
  <blockquote>
    <p>Distributed transaction completed.
    Either enlist this session in a new
    transaction or the NULL transaction.</p>
  </blockquote>
  
  <p>I timed how long it takes to timeout and it is constantly around 60 seconds. Hence, I thought that it might have something to do with the transaction timeout limit (default 60s) set in Component Services (Windows XP). I increased it to 300 seconds.</p>
  
  <p>When that didn't work, I edited the machine.config file by adding:</p>
  
  <pre><code>&lt;system.transactions&gt;
    &lt;machineSettings maxTimeout="02:00:00" /&gt;
  &lt;/system.transactions&gt;
  </code></pre>
  
  <p>This did not work either.</p>
  
  <p>I don't believe it has anything to do with my data. It is read from an excel spreadsheet. It runs fine when I cut the spreadsheet into two separate files.</p>
  
  <p>Hopefully, I'm just missing something simple like another max timeout setting somewhere.</p>
  
  <p>Hopefully, somebody has run into this before!</p>
  
  <p>EDIT: I am using SQL Server and Linq2SQL.</p>