Timeout on a really fast query
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3182
Printed Date: 25-Jan-2026 at 12:15pm
Topic: Timeout on a really fast query
Posted By: pponzano
Subject: Timeout on a really fast query
Date Posted: 28-Dec-2011 at 2:51am
Hello IdeaBlade, I'm currently facing troubles when executing a simple stored procedure that executing from SQLServer manager returns in 1-2 second...calling it from my WPF applicazion takes a lot of time and it goes in timeout (other stored procedure that takes 20-40 seconds run fine)
my call is :
public void LoadData() { IsBusy = true; CanPrintExport = false;
_repository.LoadNote(App.LoggedUser.IDIstituto, Date, results => { ResultList = new BindableCollection<NotesResult>(results.Cast<NotesResult>());
CanPrintExport = true; IsBusy = false; }, e => MessageBox.Show(e.Message));
}
and here's my call to the stored procesure in applicationrepository
public INotifyCompleted LoadNote(int idIstituto, DateTime date, Action<IEnumerable> onSuccess, Action<Exception> onFail) { var query = Manager.myStore(idIstituto, date);
query.CommandTimeout = 60; //this can be 180 ...always got the same problem var op = query.ExecuteAsync();
return op.OnComplete(onSuccess, onFail); }
The strange thing is that a lot of time elapse between the load button click and the RPC completed on the Sql Server profile to appear..
Thanks Paolo
|
Replies:
Posted By: kimj
Date Posted: 28-Dec-2011 at 8:49am
|
Does it always time out? It may be that the timeout isn't coming from the database but is instead a communications timeout. Looking at the exception and all inner exceptions may help indicate where the timeout is originating. If it is a communications timeout, then my first thought would be to check the NotesResult class to be sure it's serializable and defined on both client and server.
|
|