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 8315747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:12:09+00:00 2026-06-08T21:12:09+00:00

Working with Entity framework and had a couple of questions on timeouts. This following

  • 0

Working with Entity framework and had a couple of questions on timeouts.

This following article http://blogs.msdn.com/b/khen1234/archive/2005/10/20/483015.aspx
says

A client signals a query timeout to the server using an attention event. An attention 
event is simply a distinct type of TDS packet a SQL Server client can send to it. 

So SQL Server by itself (without a governor) cannot respect the issued command’s timeout and kill it after the timeout expires.Take as an example the following query

var x = objectContext.Employees.Select(e => e.FirstName);

We issue the query – If we assume the query takes 40 seconds to complete and the default command timeout is 30 seconds. When is the attention event triggered?

A) At 30 seconds?

B) After 40 seconds (when the query returns after 40 seconds EF checks if it is greater than default and then throws the exception)?

Here I am also assuming the code also will throw a SqlException and automatically trigger an attention event.

  • 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-08T21:12:10+00:00Added an answer on June 8, 2026 at 9:12 pm

    At 30 seconds. Think of the Timeout amount as “Wait no longer than…”

    The timeout will trigger a SqlException. The “attention event” is lower level than that.

    The client (EF, or whatever) keeps track of the query, and after the timeout, informs the server that it is no longer interested in the results, and throws an exception. Your client code should handle that exception appropriately.

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

Sidebar

Related Questions

I never used this framework, in fact I had been working with java for
I am working with Entity Framework 4.0 (VS 2010 Beta 2, NOT RC). I
I'm changing my project from working with Linq-to-SQL to working with Entity Framework. I
I'm working with the Entity Framework and I'm having a problem: When I try
An app I'm currently working on uses Entity Framework 4 which connects to a
Can someone tell me how can I get MS Entity Framework working with PostgreSQL.
Working on a project using Entity Framework (4.3.1.0). I'm trying to figure out how
I'm working with a small model in Entity Framework 4.0. I'd like to have
I'm working with MVC3 and Entity Framework but i came to a point where
i've started working with ASP.NET MVC and using Entity Framework, concretely with SQLite db,

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.