IBM Support

Content Engine Memory Issue with Principal Search

Troubleshooting


Problem

Content Engine encounters java.lang.OutOfMemoryError during user or group search.

Symptom

Starting with version 5.1.0.4-P8CE-FP004, Content Engine (CE) Server sometimes encounters java.lang.OutOfMemoryError when an application executes a search for users or groups. This issue can occur when users are members of a very large number of groups. This issue is more likely to occur when Process Engine is used with Content Engine.

Cause

Prior to 5.1.0.4-P8CE-FP004, the Content Engine server's property filter logic had a flaw in User and Group retrieval. This flaw caused Enumerations properties that were specified in a PropertyFilter argument (such as MemberOfGroups) during a User/Group search, to be returned as unevaluated values in CE server. This behavior violates Content Engine's PropertyFilter rules and can cause certain applications to either fail or experience very poor performance.

This issue is resolved in Content Engine 5.1.0.4-P8CE-FP004. As a side effect of this fix, Content Engine might now return more data compared with the previous Content Engine versions, resulting in memory issues when an inefficient PropertyFilter argument is used during a User/Group search.

For example, an application could launch the following call to search for all users whose short names start with the character "a", with a PropertyFilter requesting that all types of properties in User objects be returned:

PropertyFilter pf = new PropertyFilter();
pf.addIncludeType(1, null, null, FilteredPropertyType.ANY, null);

UserSet users = realm.findUsers(
    "a",
    PrincipalSearchType.PREFIX_MATCH,
    PrincipalSearchAttribute.SHORT_NAME,
    PrincipalSearchSortType.ASCENDING,
    new Integer(0),
    pf);

This search could result in hundreds of users returned in one round trip, and each user's MemberOfGroups property could contain thousands of groups that this user belongs to recursively. Processing all of this data requires a very large amount of memory and might result in java.lang.OutOfMemoryError.

Another potential side effect is that the physical size of the Content Engine's Principal Cache may become very large. For example, the following principal search results in the user being cached in CE server:

PropertyFilter pf = new PropertyFilter();
pf.addIncludeType(1, null, null, FilteredPropertyType.ANY, null);

UserSet users = realm.findUsers(
    "user1",
    PrincipalSearchType.EXACT,
    PrincipalSearchAttribute.SHORT_NAME,
    PrincipalSearchSortType.ASCENDING,
    new Integer(0),
    pf);

Each cached user's MemberOfGroups property may contain thousands of groups that this user is a member of, which would require a very large amount of memory, and which could potentially result in java.lang.OutOfMemoryError.

Diagnosing The Problem

Content Engine encounters java.lang.OutOfMemoryError when calling the Content Engine API Realm.findUsers() or Realm.findGroups() methods.

Resolving The Problem

One or more of the following solutions might be needed to resolve this issue:

1. Add more physical memory and increase the heap size of CE server.

2. For applications that call the Content Engine Realm.findUsers() or Realm.findGroups() methods, change the PropertyFilter passed into these calls so that Enumeration properties (for example, MemberOfGroups) are excluded from the results returned by the search. An efficient and easy way to do this is to pass in null as PropertyFilter value, as demonstrated in the following sample code:

PropertyFilter pf = null;
UserSet users = realm.findUsers(
    "a",
    PrincipalSearchType.PREFIX_MATCH,
    PrincipalSearchAttribute.SHORT_NAME,
    PrincipalSearchSortType.ASCENDING,
    new Integer(0),
    pf);

3. When Process Engine is integrated with 5.1.0.4-P8CE-FP004 and later code lines, apply both the Process Engine client test fix for each application that hosts PE clients (such as Workplace XT) and the Process Engine server Limited Availability fix on top of version Process Engine 5.0.0.5-P8PE-FP005.

Both Process Engine clients and the Process Engine server can call the Content Engine API directly, so both fixes are necessary. The version for the Process Engine client fix is 5.0.0.5-P8PE-TF003. The version for the Process Engine server fix is 5.0.0.5-P8PE-LA008.

In addition, 5.0.0.6-P8PE-IF002 makes both the server and client fixes generally available, and 5.0.0.7-P8PE-FP007 will include these fixes when it becomes available.

[{"Product":{"code":"SSNVNV","label":"FileNet Content Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Content Engine","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"5.1.0;5.2.0","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSGLW6","label":"IBM Content Foundation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Content Engine","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"5.2","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21671531