Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:27:14+00:00 2026-06-08T10:27:14+00:00

I have a .Net application which interacts with a DB2 database (Entity Framework, not

  • 0

I have a .Net application which interacts with a DB2 database (Entity Framework, not sure if that detail is important). Occaisionally I will get the following error on queries:

ERROR [57014] [IBM][DB2] SQL0952N  Processing was cancelled due to an interrupt.

This is the entire error text (the inner exception). It does not have a SQLSTATE.

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.

I have searched for some documentation and found the following:
http://www-01.ibm.com/support/docview.wss?uid=swg21450816

Just in an attempt to troubleshoot, I followed a suggestion in the above docs and set QueryTimeout=0 in my connection string. This did not help, I still get the error at about the same rate. I even tried QueryTimeout=500… 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?

Connection string below:

<add name="myConn" connectionString="(entity framework stuff);provider=IBM.Data.DB2;provider connection string=&quot;Database=myDB;User ID=myId;Server=myServer;QueryTimeout=0&quot;" providerName="System.Data.EntityClient" />
  1. Could there be some other timeout setting that is overriding or taking precedence over the setting I am specifying in the connection string?
  2. Is it possible I am not 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?

EDIT

I just tried setting QueryTimeout=1 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:27:15+00:00Added an answer on June 8, 2026 at 10:27 am

    I was able to solve this issue by setting the CommandTimeout on my EF data context like this:

    using (dataContext = new myDB2Entities())
    {
         dataContext.CommandTimeout = 60;
         // DB CODE
    }
    

    I understand now that the QueryTimeout setting I had been trying to use is simply a time interval, and at every interval the database checks to see if the application is still waiting for a response. I had not addressed the fact that the application was issuing an interrupt after the default 30 seconds.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.NET MVC application which is build up as an assembly that
I have inherited couple of .Net (C#) application which does not have any tracing
I have an ASP.Net web application, which interacts with .Net Remoting application server. As
I have a C# service application which interacts with a database. It was recently
I have a .NET application which serializes an object in binary format. this object
I have an ASP.net application which returns a binary PDF file (stored from the
I have a .net web application which has a reference to a web service.
I have a ASP.NET web application which has more than 100 pages. Each page
I have an ASP.NET application in which i want to post data using jQuery
A simple question. I have an ASP.NET web application which contains several assemblies and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.