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
[857 byte] By [Osi] at [2007-12-21]
# 1

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

RanjeshJ at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

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

BillZunis at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified