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

sqlserver , mssqlserver , ado.net , microsoft dotnet , csharp Mahbūbnagar, India
  • 6 years ago

    Hi Experts,

    I have a windows service running every minute and has many database operations to perform. It runs perfectly for many days, sometimes it suddenly stops and throws this exception. Later when we start to debug it, the exceptions goes off, but if we don't debug, the exception continues to come. We are tired of this totally random scenario. Please assist us with this.

    We are using sqlhelper.cs for database interaction.

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

    Best Regards, Wajid Ahmed Ansari.

  • 6 years ago

    It seems a DB problem, but i connected through Sql Management studio and iam able to do everything through it (Like querying,updating etc...), just through code is the problem.

    The service is calling DB very frequently. Since three hours the service is responding well and no sign of DB overloads. Also it had been on for 20 days without rest and everything was well.

    I will post the message if i get this exception again, i already cleared my logs before.

    The additional insight into the problem is every method going to DB suffers the same exception. Like simple update statement running within a second now takes more than 30 seconds when this problem comes up.

    So i got curious as whats the main issue.

    Hope this helps to get hold of problem.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry