High memory usage with get document method

  • 16 February 2021
  • 0 replies
  • 24 views

Userlevel 5
Badge +20
 

High memory usage with the "GetDocument" method

KBS100052

PRODUCT
K2 blackpearl
BASED ON
K2 blackpearl (all)
TAGS
Microsoft SharePoint
SmartObjects
SmartForms
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. 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.

Issue

There were issues with the memory usage performance on an environment.

The K2 Hostserver.exe memory usage increased to 99%, and the system becomes unusable. 

Image

Symptoms

On inspection of the K2 hostserver.exe memory dump, it was found that the majority of the memory was allocated in string. 

When the string was extracted from the memory dump, it was found that there were multiple documents loaded into memory. 

This investigation then lead to inspection of the forms views and workflows to determine how these are loaded into memory. It was concluded that the files are loaded into memory when Get document, Get Documents and Get Document by ID methods are used in forms, views and workflows. This also occurs if an expression is built using the Document Library SmartObject in the context browser of the expression. 

Resolution

It is advised that you do not use the GetDocuments methods anywhere, and specifically in these places:

 

1. Directly within the rules of Forms Views
2. Data sources of controls
3. Expressions

 

It is recommended that you use the GetDocumentsMetaData method instead.

This solved the issue, and the memory usage decreased dramatically.

 

 


0 replies

Be the first to reply!

Reply