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

  • Home
  • SEARCH
  • 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 6848143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:49:54+00:00 2026-05-27T00:49:54+00:00

From time to time our server throw this well-known exception: Timeout expired. The timeout

  • 0

From time to time our server throw this well-known exception:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

This happens under pressure when the server is working on big requests.
I did some research and found out that I could change connection string connection timeout setting and/or SqlCommand.Timeout data reader properties.

By default, sql command timeout is set to 30 seconds and connection timeout to 15, and we never override them.

I reproduced the context and executed the failling requests by hand in management studio.
Their duration are around 1 second and always far beyond 30.

But strangely when I take a look at the server logs, this exception is thrown right away the request call.
I mean, the request is executing and one millisecond later the exception is raised.
Excuse me but let me do my geek look about this 8-o.

To be complete, our sql instance is mirrored with another one in synchronous mode.
We use Ado.Net through table adapters.

  • 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-05-27T00:49:54+00:00Added an answer on May 27, 2026 at 12:49 am

    In fact we still experienced these random timeouts even after READ_COMMITED_SNAPSHOT was set.

    Setting the mirror in asynchronous mode didn’t helped, queries done in multiple threads still randomly timeouted after about 1ms, always on busy periods. On the other hand the specific query that triggered the timeout (an INSERT statement) executed itself really fast (less than 1ms CPU and about 10 reads in average).

    The call stack was the following:

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

    at System.Data.SqlClient.SqlConnection.Open()

    So the timeout didn’t seem related to the query itself.

    According to this other post : Multiple Simultaneous SQL Connection Timeouts In Multithreaded Windows Service and the linked MSDN blog post speaking about an ADO.NET bug, we tried to set the connection timeout to 150 in the connection string.

    Can’t be certain we were experiencing this bug, but no more timeouts have been thrown since this change.

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

Sidebar

Related Questions

Our software manages a lot of data feeds from various sources: real time replicated
From time to time I see something like this: class Clazz { private int
Intermittently in our app, we encounter LockTimeoutExceptions being throw from SQL CE. We've recently
After client downloads a file from our server with our app, the app does
From time to time I see an enum like the following: [Flags] public enum
From time to time I get a System.Threading.ThreadStateException when attempting to restart a thread.
From time to time I read that Fortran is or can be faster then
From time to time I browse the web and look for interesting algorithms and
From time to time, I need to dump USB traffic under Windows, mostly to
From time to time, I run into communications issue with other programmers, when we

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.