K2 4.5 Tip of the Day: Workflow Archival and Large Databases

I saw this issue that one of the US customers had when they tried to archive a large set of data.  During the archiving process, they get this error:

 "2025 Error Marshalling SourceCode.Workflow.Runtime.Management.WorkflowManagementHostServer.Archive, Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

This was related to the tables which stored the Activity XML fields (it was huge).

So there are a couple of options here.  You can try either option or both.

  1. The slowness might be due to fragmented indexes on the tables.  You could try rebuilding the table indexes to boost the speed.  I have attached a simple SQL script which does this.  Just modify the database name in the script as required and run it.  Note that re-building the indexes takes some resources on the SQL server.  If the server is under load, it can impact performance and sometimes cause errors.  So it might be a good idea to run this during the off-hours.
  2. You can increase the timeout setting in the SourceCode.Workflow.Runtime.Management.config file located in the <Program Files folder>\k2 blackpearl\Host Server\Bin directory.  Look for the ArchiveTimeout key and change its value.  It is set to 1000 seconds by default, which 16.67 minutes.  You can increase this value and try the archival again.

Posted Fri, Sep 16 2011 1:11 PM by johnny

Comments

Peter Yao wrote re: K2 4.5 Tip of the Day: Workflow Archival and Large Databases
on Wed, Oct 5 2011 7:30 AM

How was this issue eventually resolved?

Is the default of 16.67 minutes the expected time to allow the archive job to finish?

johnny wrote re: K2 4.5 Tip of the Day: Workflow Archival and Large Databases
on Wed, Oct 5 2011 8:15 AM

Nope, the time taken depends on the amount of data being archived.  It also depends on the environment hardware and physical setup so the timing will vary from customer to customer.

almosawi wrote re: K2 4.5 Tip of the Day: Workflow Archival and Large Databases
on Tue, Jan 15 2013 3:49 AM

Hi guys, i follow the step number 2, but unfortunately i didn't found the ArchiveTimeout key, so is there any way to add this key , or is there any other solution for this issue ??

almosawi wrote re: K2 4.5 Tip of the Day: Workflow Archival and Large Databases
on Tue, Jan 15 2013 3:50 AM

Hi guys, i follow the step number 2, but unfortunately i didn't found the ArchiveTimeout key, so is there any way to add this key , or is there any other solution for this issue ??

johnny wrote re: K2 4.5 Tip of the Day: Workflow Archival and Large Databases
on Sun, Jan 20 2013 4:59 PM

I checked my VM and it is there.

It should be under the <appSettings> node

 </connectionStrings>

 <appSettings>

...

   <add key="ArchiveTimeout" value="1000" />

...

 </appSettings>