Click here to Skip to main content
15,895,836 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#

Timeout Error happen to my website when many user accessing the site. by the way the website has an large database processing large of data.

What I have tried:

we always restarting our server to resolved the issue. but it happens again.
Posted
Updated 9-May-21 21:33pm
Comments
Member 12960626 10-May-21 3:47am    
we are suspecting that when to many user accessing the website the problem happen. because in the morning their are no problem with the site.

1 solution

We can't tell: we have no idea what your code is doing, how it is doing it, or any way to test it.

Start start by adding logging code to it to monitor what is happening when it fails - this will probably slow the site down and make the failure happen sooner, but that could be useful at this point. You can remove the logging when you have data to process.

Then look at the logs, and work out what is taking time to process and concentrate on that - add more logging if you need to to to narrow down the area.

Sorry, but this needs your code running with your data to give anyone an idea of what is happening - and we have no access to either!
 
Share this answer
 
Comments
Member 12960626 10-May-21 3:48am    
we are suspecting that when to many user accessing the website the problem happen. because in the morning their are no problem with the site.
OriginalGriff 10-May-21 3:52am    
Yes, probably - but we can't see what it's doing, so you need to find out!

You can't fix it unless you know what is causing the problem - and "too many users in the morning" is nowhere near specific enough for a diagnosis!
Member 12960626 10-May-21 3:54am    
Server Error in '/' Application.
The wait operation timed out
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.ComponentModel.Win32Exception: The wait operation timed out

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:


[Win32Exception (0x80004005): The wait operation timed out]

[SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3306108
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +736
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4061
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +90
System.Data.SqlClient.SqlDataReader.get_MetaData() +99
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +604
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3303
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +667
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +83
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +301
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +201
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +178
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +119
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2868
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +26
DevExpress.Web.Internal.DataContainer.PerformSelect() +151
DevExpress.Web.ASPxDataWebControlBase.DataBindInternal() +166
DevExpress.Web.ASPxWebControl.DataBind() +50
NVQSD.LM_Evaluation.ESspeval.Page_Load(Object sender, EventArgs e) +1997
System.Web.UI.Control.OnLoad(EventArgs e) +106
System.Web.UI.Control.LoadRecursive() +68
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785
Member 12960626 10-May-21 3:55am    
this is the error sir/mam
OriginalGriff 10-May-21 4:27am    
So ... your DB query (that we can't see) on your data (that we can't access) on your server (that we can't reach) as called by your code (that we have no idea about) via your user's browsers (that we can't even locate, let alone identify) is taking too long and timing out.

What part of that do you expect me to fix from 11,000Km away?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900