Print Page | Close Window

ExecuteSave called twice on timeout

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=2749
Printed Date: 13-Mar-2025 at 4:16am


Topic: ExecuteSave called twice on timeout
Posted By: LarsDraco
Subject: ExecuteSave called twice on timeout
Date Posted: 09-Jun-2011 at 3:02am
I have a problem with the EntityServerSaveInterceptor. When I do some stuff in the ExecuteSave method and it comes to a send timeout, because the stuff I do in the ExecuteSave method takes to long -> the ExecuteSave method will be called again... Is this by design???

The problem can easily be reproduced with the following EntityServerSaveInterceptor (assuming the send timeout is set to the default 1 minute):

public class MyEntityServerSaveInterceptor : IdeaBlade.EntityModel.Server.EntityServerSaveInterceptor
{
protected override bool ExecuteSave()
{
System.Threading.Thread.Sleep(61000); // Sleep produces timeout -> ExecuteSave will be called again
return base.ExecuteSave();
}
}



Replies:
Posted By: kimj
Date Posted: 14-Jun-2011 at 6:09pm
This is by design.  Any timeout exception will trigger an automatic retry, which is what you're seeing.


Posted By: LarsDraco
Date Posted: 15-Jun-2011 at 1:27am
Thanks for your answer! Is there a way to get rid of this behaviour?


Posted By: kimj
Date Posted: 15-Jun-2011 at 6:51am
No, this is not currently configurable, but you can set various timeout values to avoid the problem.  As you mentioned you can modify the client's SendTimeout, and also the Transaction timeout and the ASP.NET execution timeout.  Here's more info on what's configurable - http://drc.ideablade.com/xwiki/bin/view/Documentation/understand-timeouts - http://drc.ideablade.com/xwiki/bin/view/Documentation/understand-timeouts



Print Page | Close Window