Windows Workflow Foundation 3


PersistenceService - Transaction Timeout


Hi,
i use WF Beta 2.2 with PersistenceService and i execute a lot of workflows with
hundreds of activites parallel.
Somtimes i get this PersistenceException:
-----------------
Exception (System.Workflow.Runtime.Hosting.PersistenceException) : The transaction has  aborted.
The transaction has aborted.
Transaction Timeout
-----------------
and  my workflow is terminated. I also use TrackingService with
the same connection string and
SharedConnectionWorkflowCommitWorkBatchService is activated.
PersistenceService ownership is set to 10 days (i use only one workflow
runtime) and polling interval is set to 5 seconds but it shouldn't be
the problem.
MS DTC is enabled (i use a separate machine for DB), and MS DTC
transaction timeout is set to 10 minutes, so it should be enough :)
Can anyone please help?
Thanks
Osi
Hi,
      If you are using batched mode for tracking (which is true by default), tracking data is not immediately written to the database but is done during the next persistance point. If you do not have enough persistance points, you will collect up large amounts of data and when comitting it might take enough time to cause a transaction timeout. You might want to force some persistance points in your workflow to prevent this. You can try using UnloadOnIdle, or add the "PersistOnClose" attribute on one of your custom activities. This will case the workflow to persist flushing everything to the database more frequently and keep your transactions from timing out.
On a sidenote, does it wait for 10mts before it times out?
Hope this helps.
Ranjesh
Hi,
      If you are using batched mode for tracking (which is true by default), tracking data is not immediately written to the database but is done during the next persistance point. If you do not have enough persistance points, you will collect up large amounts of data and when comitting it might take enough time to cause a transaction timeout. You might want to force some persistance points in your workflow to prevent this. You can try using UnloadOnIdle, or add the "PersistOnClose" attribute on one of your custom activities. This will case the workflow to persist flushing everything to the database more frequently and keep your transactions from timing out.
On a sidenote, does it wait for 10mts before it times out?
Hope this helps.
Ranjesh
Osi,
Is your TrackingService also aborting? Also, have you look at the any SQL trace logs to see what SQL is doing. 
It might be interesting to know what type of activities are running in parallel with the same runtime.
Billz  

Related Links

Changing which workflow items are available when modifying at runtime
ExpenseReport Sample Cancle Approval Question
Problem with sendmail Activity
Global Run Time Variable
To use dependency properties or not
OwnershipTimeoutSeconds
Problem in WorkflowRuntime.WorkflowCompleted event
HandleExternalEvent Problem
WWF with .NET compact framework 2.0
How can I query StateMachineWorkflowInstance before the WF idles
Question about modifying a workflow
Rule Conditions against custom activities and XAML activation - how should I achieve this?
MOSS Publishing Site
WF custom persistence once again
Hands on Labs 2.2
WF Virgin

Categories

MSDN
Game Development
Windows Desktop Develo...
BizTalk Server
Windows Server
Bing
Microsoft Research
Bing Ads API: Development
Other Forums
Archived Forums #
OneDrive Development
Software Entwicklung f...
Open source Developmen...
Forums Redesign - Q&A ...
Register and Manage Ac...
Windows Desktop Search...
Windows Desktop Pro-Au...
Windows Hardware Testi...
SharePoint 2013 - Deve...
SharePoint 2013 - Search
SharePoint 2010 - Setu...
Azure Mobile Apps
Microsoft Azure Site R...
Azure Automation
Azure Marketplace
Azure Scheduler
Azure Data Factory
Azure Stream Analytics
Machine Learning
Azure Service Fabric
Azure Time Series Insi...
.NET Framework Class L...
Team Foundation Server...
Team Foundation Server...
Team Foundation Server...
BizTalk Server Adapter...
Commerce Server 2007
The Forum of Sho
Microsoft Translator H...
.NET Compact Framework
Visual Studio Smart De...
SQL Server SMO/DMO
SQL Server XML
Getting started with S...
Microsoft StreamInsight
Database Design
SQL Server Master Data...
SQL Server Data Qualit...
Windows Embedded 8 Sta...
Standard 2009: Compone...
Standard 2009: Tools
Standard 7: Servicing ...
Standard 7: Misc
SQL Server 2012 Databa...
Windows Live ID: Devel...
MSDN Subscriptions Fee...
MSDN and TechNet Searc...
Orchard - Help and Sup...
MSDN Magazine
Microsoft Automatic Gr...
Office Live Basics, Es...
Office XML, ODF, and B...
Visio General Question...
Programming Silverligh...
Visual Studio Report C...
Windows Performance To...
Retired SharePoint Soc...
Project Online General...
.NET Framework 4 Relea...
Acropolis
Building Windows Store...
Feedback for Visual Ba...
Git, Mercurial and Dro...
Pex and Moles PowerTool
Project Codename:  Jasper
Silverlight (formerly ...
Silverlight (formerly ...
Service Bus EAI & EDI ...
SyncFx - Feedback [Rea...
SQL Server in Azure VMs
SQL Server 2014 High A...
SQL Server 2014 Integr...
Team Foundation Server...
Visual Basic Express E...
Visual Basic Interop a...
Visual Studio 2008 SP1...
Visual Studio LightSwi...
Visual Studio Source C...
Web Sandbox - Exploits
Windows CardSpace ('In...
Windows Desktop Vista ...
Windows Developer Prev...
Windows Live Alerts De...
Windows Workflow Found...
Working with Data and ...
Building Windows Store...
XML in Windows (MSXML ...
XML Paper Specificatio...
XNA Framework
Windows Phone Preview ...
SQL Server 2016 Preview
Microsoft R Server

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile