title: TinyTds Error: Adaptive Server connection timed out
body: <p>We are running a ruby on rails application on rails 3.2.12 (ruby 1.9.3) with current tinyTDS gem 0.6.2.</p>
  
  <p>We use MS SQL 2012 or 2014 and facing more then usual the following error message:</p>
  
  <pre><code>TinyTds::Error: Adaptive Server connection timed out: EXEC sp_executesql [...]
  </code></pre>
  
  <p>Database AUTOCLOSE is off.
  TCP Socket Timeouts are default Windows system.</p>
  
  <p>Application server is on machine #1 (windows server), SQL server is on machine #2 (windows server).</p>
  
  <p>When I check the connections (netstat) I have like 250 connections open for around 20-30 users.
  I run perform.exe to see idle time on SQL server for the data and log disks.</p>
  
  <p>database.yml has connection <code>pool:32</code> and <code>reconnect:true</code>.</p>
  
  <p>To me it looks like that tinyTDS lost connection and any exception prevents from reconnecting.</p>
  
  <p>The question is, how can I debug into the problem to find out what the problem is?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My mistake, the original error message belongs to tinytDS 0.5.x. Since I updated to the latest version I get the following error in addition or instead:</p>
  
  <pre><code>ActiveRecord::LostConnection (TinyTds::Error: DBPROCESS is dead or not enabled: BEGIN TRANSACTION):
  </code></pre>