This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


This hotfix addresses numerous memory and state issues experienced in K2 blackpearl 0807 4.8210.1.x, K2 blackpearl 0807 4.8210.2.0, K2 blackpearl 0807 with KB000370. Most of the fixes for the memory usage improvements are on the K2 Host Server (K2 Server) as all of the hosted servers run inside Host Server. The only exception are fixes made on the SmartObject Server which will effectively improve the memory usage on the SQL Server

State Fixes

The state fixes are discussed in KB000428 - Hotfix: K2 Workflow Server Changes

Memory Fixes

K2 Workflow Server:
  1. Implemented finalizers on ArchiveX classes to clear buffers.
  2. Removed redundant state information that was kept in memory for running processes.
  3. Dispose SqlCommand objects to speed garbage collection cycles.
  4. Delete ArchiveX objects to speed garbage collection.
  5. Free security handles (LSASS).
  6. Close client and server sockets immediately when disconnecting (linger option none).
  7. Updated worklist queries to use common table expressions in place of temp tables.
  8. Eliminated unnecessary calls to stored procedures during retrieval of worklist items.
  9. Added referential integrity constraints to the K2 Server database
  10. Cleanup of orphaned data in production tables.
  11. Corrected backward compatibility with K2.net 2003 escalations.
  12. Workflow Management: Added methods on SqlConnection objects to ensure pool resources are released correctly.
  13. Workflow Management: Explicitly implemented Dispose on all SQL objects.
SmartObject Server:

Reduced SQL Server cache memory by:
  1. Drop Table removed from Create temp table script
  2. Temp table names changed from a Guid to #TempTable[1..9]

URM Server:
  1. Implemented Dispose on all SQL Based objects.
  2. Implemented Dispose on all DirectoryService objects in ADUM.
K2 Host Server:
  1. SQL Based Objects:
    • C#: Implemented Dispose on all SqlCommand and SqlDataReader
    • C++: Implemented automatic scope for SqlCommand and used a try/catch/finally to Close SqlDataReader
  2. Wrapped Disposable items inside of ArchiveX in Using statements
  3. Close client and server sockets immediately when disconnecting (linger option none).
  4. Free security handles (LSASS).

Error Messages

No error messages are displayed but the following symptoms relate to a memory issue:
  1. K2 Host Server service stopps responding and users are unable to process work items.
  2. Heavy memory usage when submitting InfoPath forms with large file attachments. Running a test with 20 concurrent users with a medium complexity process and the memory usage spikes into 3GB+
  3. Over a period of time a noticable change is experienced in K2 blackpearl's performance

Error Resolution

This Hotfix is contained within the latest K2 blackpearl 0807 Update. Install the update package to resolve the error.

The latest K2 blackpearl 0807 Update is available as an independent installation package which can be found here: https://portal.k2.com/downloads/bp/default.aspx