Timeout Expired Error

Posts   
 
    
lss
User
Posts: 25
Joined: 23-Dec-2008
# Posted on: 06-Jan-2009 17:56:13   

I got this error"System.Exception: Creation of new employee aborted. ---> SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException: An exception was caught during the execution of an action query: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception. at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute() at SD.LLBLGen.Pro.ORMSupportClasses.BatchActionQuery.Execute() at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteActionQuery(IActionQuery queryToExecute) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PersistQueue(ArrayList queueToPersist, Boolean insertActions) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave, IPredicateExpression updateRestriction, Boolean recurse) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave) at App2.BLL.EmployeeUtility.CreateNewEmployee(String pmFName, String pmLName, String pmMI, String pmSSN) --- End of inner exception stack trace --- at App2.BLL.EmployeeUtility.CreateNewEmployee(String pmFName, String pmLName, String pmMI, String pmSSN) at App2.BLL.EmployeeUtility.CreateNewEmployee(String pmFName, String pmLName, String pmSSN) at page2.Page_Load(Object sender, EventArgs e)

I'm not sure what cause the error because the application was working fine, and today it just threw the error Would someone explain it to me please. thanks lss

lss
User
Posts: 25
Joined: 23-Dec-2008
# Posted on: 06-Jan-2009 18:05:55   

I found this info on : http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx

It mentioned that default Connection Timeout is 15 secs. Is there anyway that I could change the Connection Timeout, and where could I change it?

thanks lss

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 06-Jan-2009 21:31:32   

Timeouts will generally be caused by something in the database that you are trying to modify being locked by another transaction. You could update the CommandTimeout property of the DataAccessAdapter as described here but this is rarely the solution unless you genuinely have a long running query somewhere else which is locking the data.

Do you have any other users/application etc running against the same database - you need to investigate what is causing the lock.

SQL Server has good tools to allow you to do this - I imagine other DBs have similar tools available...(except Access rage )

Matt