title: DB2 queries get occasional SQL0925N: Processing cancelled due to interrupt error
body: <p>I have a .Net application which interacts with a DB2 database (Entity Framework, not sure if that detail is important).  <em>Occaisionally</em> I will get the following error on queries:</p>
  
  <pre><code>ERROR [57014] [IBM][DB2] SQL0952N  Processing was cancelled due to an interrupt.
  </code></pre>
  
  <p>This is the entire error text (the inner exception).  It does not have a SQLSTATE.</p>
  
  <p>Again, this does not happen every time (even for the same query).  For instance, I can run the same query over and over again and only see the error happen 1 out of 5 times.  The duration of the query is always fairly consistent.</p>
  
  <p>I have searched for some documentation and found the following:
  <a href="http://www-01.ibm.com/support/docview.wss?uid=swg21450816" rel="nofollow">http://www-01.ibm.com/support/docview.wss?uid=swg21450816</a></p>
  
  <p>Just in an attempt to troubleshoot, I followed a suggestion in the above docs and set <code>QueryTimeout=0</code> in my connection string.  This did not help, I still get the error at about the same rate.  I even tried <code>QueryTimeout=500</code>... same result.  What is interesting is that in testing, when this error occurs it happens at roughly the 30 seconds mark (which the documentation mentions is the default timeout).  Am I still using the default timeout setting somehow?</p>
  
  <p>Connection string below:</p>
  
  <pre><code>&lt;add name="myConn" connectionString="(entity framework stuff);provider=IBM.Data.DB2;provider connection string=&amp;quot;Database=myDB;User ID=myId;Server=myServer;QueryTimeout=0&amp;quot;" providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <ol>
  <li>Could there be some other timeout setting that is overriding or taking precedence over the setting I am specifying in the connection string?</li>
  <li>Is it possible I am <em>not</em> dealing with a timeout issue but some other issue?  I have read that this can be an indication of locking... but I can reproduce this in test being the only person accessing the database at the time. Could it be something else?</li>
  </ol>
  
  <p><strong>EDIT</strong></p>
  
  <p>I just tried setting <code>QueryTimeout=1</code> thinking that this would for sure cause every query to time out.  This seems to have had no affect.  4 out of 5 queries still completed after taking WELL over a second.  What am I missing here?</p>