.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Timeout error - The timeout period elapsed prior to completion

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
 
Hi, I'm using ASP.NET 3.5 (c#) with SQL Server 2008 server. Recently, I started getting error "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.". After looking at forums for solutions, I added the below common code to my application. protected DbCommand CreateCommand() { SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandTimeout = 600; // 10 minutes return sqlCommand; } However, intermittently, I'm still getting the timeout error. I added the logging to see where error is occuring. And found that before executing one of the query, it is giving this error. Now, my assumption is that I should have received this error after runnign query for 600 seconds (10 minutes) since I set it in the above function. But the timeout error is occuring instantaneously within 1 second itself. In the log, I printed one line above & after the query to identify how much time it would take. Surprisingly, the log says that 9:00 AM "Before query execution" & at 9:01 AM "timeout expired...." I would really appreciate if some one can help me out here! Thanks!


View Complete Post


More Related Resource Links

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

  

Hi,

 I keep getting the following error. I also added time out parameter in the connection stirng and it still did not help. Has any one faced similar issues.

Thanks in adavance.

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

 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]
   System.Data.SqlCl

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This ma

  

Hi all,

 

I have one webservice . previously i had used microsoft enterprice library  then i got some tome out exception  then some of my friends told that the exception because of enterprice library . then i changed my data access layer to normal connection.

But  still i got the time out error ... also i had done some more settings

 

<add key="pooling" value="true" />
        <add key="Max Pool Size" value="500" />
        <add key="Min Pool Size" value="2" />

also i given the connection timeout =10.

and i cross checked the code  every ware i am closing the connection also........But still  i am getting the error as

"Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached"

 

 

 

Please help me to solve this issue...

 

thanks in advance.

 

 







timeout period elapsed exception occuring on multiple tables

  

what facilities are there in sql server to help me track down why I am suddenly getting an unresponsive web app that eventually signals a "timeout expired" exception on a linq to sql SubmitChanges instruction?  First, I was gettng the timeout exception on a single row in a central table. I changed the code to ignore that error and was able to get the app to start ( by browsing to it from the browser. ) Now, 20 minutes later, the same problem is happening on a 2nd table.  Will sql server tell me what rows in what tables are currently locked ?

thanks,

 

 


Page Reload after TimeOut Error

  
I have a Web app using Forms authentication. I Use Timeout in Web.Config to TimeOut from application that is working fine and I am Redirected to Login page with Message on page "The application timed out. Please ClockIn/Login."  When I am Logging again I am Redirected to the same page with same error message and after that if I try Logging again second time I am able to Login. Following is the code from different form which i am using. Web.Config     <sessionState timeout="2">        </sessionState>    <authentication mode="Forms">      <forms loginUrl="Login.aspx" protection="All" timeout="2" slidingExpiration="true" defaultUrl="Home.aspx">      </forms>    </authentication>    <authorization>      <deny users="?"/>    </authorization>Global.aspx protected void Application_AcquireRequestState(object sender, EventArgs e)        {            if (System.Web.HttpContext.Current.Session != null)            {&nb

Request.GetRequestStream() in a loop gives Timeout error

  
Hi,     I tried searching the net but didnt find any relevant information regarding this issue, I am trying to pass data to a servlet and am sending it in a loop as a different request everytime , after the second request the debugger  just hangs on this statement Request.GetRequestStream() and comes back after a lot of time or either gives a timeout error   Following is the code   try { log.Info(xmlTrade); UTF8Encoding encoding = new UTF8Encoding(); byte[] bytes = encoding.GetBytes(xmlTrade); HttpWebRequest request = (HttpWebRequest) WebRequest.Create(tradeServletPath); log.Debug("Servlet Path: " + tradeServletPath); request.Method = "POST"; request.ContentType = "text/xml"; request.ContentLength = bytes.Length; request.Timeout = timeout; Stream stream = request.GetRequestStream(); try { stream.Write(bytes, 0, bytes.Length); } finally { stream.Close(); } return "Success"; } catch(Exception ex) { log.Error("Exception occured when submitting this trade xml: " + xmlTrade); if(ex.Message.StartsWith("The underlying")) return "Connectionerror"; else return string.Empty; }

SQL 2005 open connection timeout error

  

We have Microsoft SQL Server 2005 - 9.00.4207.00 (X64)  Enterprise Edition (64-bit) on Windows server 2003 (Build 3790: Service Pack 2) .

Periodically (~ once per 15 min) some db-clients have error messages when open connection (over SQL Native Client ) like:

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

All timeouts more or equal 15 sec. Less then 15 sec is not acceptable by business rules. Performance counters (cpu,memory,disk etc.) on server does not show bottleneck. Only one sql counter - logins/sec show trouble. When problem exists then this counter = 0. Also dramatically decrease many other counters - sql batch requests/sec, transactions/sec, cpu load and some ones. SQL Server "sleep" few seconds (4 - 5) and then accessible again.

Thanks.

 

 


Timeout Error - 30 seconds - When runing long Querys

  

Hello all,

I am having problems of Timeout on my Application using Ajax Toolkit, more precisely when runing long Querys on SQL Server.

I have tryed all solution that I found os forums like:

- change the AsyncPostBackTimeout os Toolkit ScriptManager.

- Set the CommandTimeout = 60000 of the SqlCommand.

- Add Connect Timeout on Connection String.

- Add <sessionState mode="InProc" timeout = "60000" sqlCommanTimeout="60000"> on webconfig

I'm testing with a query that run normally on ManagementStudio in 50 seconds approximately, but on Application breaks with this error bellow on 30 seconds. Occurs on any browser, runing from IIS or from VS, wherever...

I'm forgoting something?  please any help..

Thanks!!

Mensagem: Sys.WebForms.PageRequestManagerServerErrorException: The timeout period elapsed prior to completion of the operation or

Getting Timeout expired error in Local reports

  

Hi all,

I am using local reports(rdlc) fils for reports generation in asp.net I am getting timeout expired error when i have more number of records. I am able to view the preview if there is less number of records. I have also added following code in by Submit button. I have tried by giving Connect TimeOut=3600 in Web.confing file at Connection. But not worked. I am using stored procedure to get the records and it was executed with in 3 secs. Very urgent give me any solution.

I have also tried by adding following code also.

da.SelectCommand.CommandTimeout = 0

Regards,

Narendra


The semaphore timeout period has expired

  
Hello,

For the past few days something weird is happening to our sql server box.  During running some procedures we get the following error message:

Msg 121, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)


It seems to happen when running large procedures or even small queries, the session where i run the query get disconnected but I can reconnect right away but it may happen again couple minutes later.

 I'm connecting to my Windows server 2003 using remote desktop and running procedures from the SQL Server installed on the Windows Server.

Anybody has an answer?  Thanks.

Timeout error from same server but different websites

  

 

 

 

 

 

Hi to all, this is maybe my first time that I have post a question, and it is just because I ran out of ideas... so maybe someone can offer a solution.

First the environment:
OS: Windows Server 2003 R2 - 5.2.3790
Microsoft SQL Server Management Studio        10.0.1600.22 ((SQL_PreRelease).080709-1414 )
Microsoft SQL Server Express 2008
Microsoft Data Access Components (MDAC)        2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML                    2.6 3.0 4.0 6.0
Microsoft Internet Explorer            7.0.5730.13
Microsoft .NET Framework            2.0.50727.3615
IIS 6.0
Computer:
Intel Xeon CPU 2.8 GHz, 2.79 GHz, 3.5 GB RAM.

History
I have a website running on this server let us name: the SiteOne which is physically stored in inetpub, and it works fine. within this site I have a .Net Web Page with nine graphs, it pulls the data from 7 SQL Express queries with the production of the day. Showing the graphs takes to the site 2 seconds the most. However, I was in the need to copy the websi

This operation returned because the timeout period expired

  

I have creetaed OSDesign using VS 2005.Later,I have created device application and I am using emulator created from OSDesign as device for connection.When I debug it gives error as, This operation returned because the timeout period expired


[Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]

  

Hello All,

I am using MS SQL SERVER 2008. Im making an application which queries trillion of records. Im using PHP as scripting language. For those functions , which query database and 200 (approximately) rows of DB are returned, everything works fine. But if I query database and a large recordset should be returned, the following error is thrown:

Array ( [0] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 258

=> 258 [2] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. [message] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. ) [1] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 258
=> 258 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) [2] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => -2147467259
=> -2147467259 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) )

If I see the error log it shows:

2010-10-17 12:32:38.88 Logon       Error: 18456, Severity: 14, State: 8.

2010-10-17 12

index and timeout error

  

Hi,

I notice there is a relation between a table index and ado error(few modificaions, updates commands),

If I disable the index, and no error, otherwise, weill get in the ado error:
Error Detail: Timeout expired
Error Source: Microsoft OLE DB Provider for SQL Server

Can someone help me track deeper? Is it a deadlock caused by the index and udpate sql?

Thanks in advance.


Timeout connection error during

  

Hi,
I have this strange problem during executing my dynamic data page:


Timeout. The available time expired prior to the completion of the operation or the server is not responding.
Description: Exception has been handled during execution of the current Web request. For more information about the error and where it originated in the code, see the stack trace.

Exception details: System.data.SqlClient.SqlException: Timeout. The available time expired prior to the completion of the operation or the server is not responding.

In debugger mode, the error is in the method:

public DynamicDataEntities(global::System.Data.EntityClient.EntityConnection connection) :
                base(connection, "DynamicDataEntities")
        {
            this.OnContextCreated();
        }

of my DynamicDataModel.designer.cs
in my solution.

But I have not other problems.

How can I solve?

Thanks in advance.

Luigi


SQL TimeOut error and nVarChar(Max)

  

On one of our applications we are getting a timeout error on an 'additional details' field in our database, the field type is nVarChar(MAX).

The error seems to be happening when a user enters more than 4000 characters into the additional details field. It is my understanding that this fieldtype can store up to 8gb of data and should be used in stead of the "Text" field type?

Has anybody any firther information on this?


We have since limited the user from entering more than 4000 characters via the application, however the DB still contains legacy data - when the 'additional details' with more than 4000 characters is pulled out - "Timeout Error".





sqlserver timeout error - corrected by server reboot - how determine cause?

  

I was gettting multiple timeout errors when submitting changes ( linq to sql ) to my sql server database. This problem occured out of the blue on an app I am coding and testing. Rebooting the client did not correct it. But, rebooting the server did make the problem go away. 

How do I determine what caused the problem. If it happens again, how do I reset things without having to reboot the server?

I am windows server 2008 r2, sql server 2008, VS2010.

thanks,

 


Error after changing sessoin timeout value

  

Hi,

I have created a web application for which i tried to change the session timeout value from sharpoint administrator.

I have change the value from 60 to 7 mins, but after changing the value my web config got modified(dont know what was modified, i came to know when i saw last updated time) and application is giving following error,

unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

 I have reset the iis and also chaneged the value from 7 to 60 mins but all in vain.

Is there  any thing that i have missed out.

Thanks,

Mishigun


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend