Bug 882932

Summary: Unable to search users by firstname, lastname, email when many users are at DB - OOM
Product: [JBoss] JBoss Enterprise Portal Platform 6 Reporter: Michal Vanco <mvanco>
Component: PerformanceAssignee: mposolda
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: epp-bugs, mvecera, theute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-16 08:55:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Vanco 2012-12-03 11:57:32 UTC
Description of problem:
Searching of user(s) by firstname/lastname/email leads to out of memory error when many users are present at DB.

Version-Release number of selected component (if applicable):
JPP 6.0.0 ER03

How reproducible:
always

Steps to Reproduce:
1. initialize many users in DB (tested with 1 million in JPP)
(apply patches for many users improvements - https://issues.jboss.org/browse/GTNPORTAL-2745 - exoadmin.war + countPaginatedUsers)
2. go to patch management
3. search existing/non-existing user by firtname, lastname, email - after few finutes, portal fails on OOM:
java.lang.OutOfMemoryError: GC overhead limit exceeded

Comment 1 JBoss JIRA Server 2012-12-04 09:52:46 UTC
Marek Posolda <mposolda> made a comment on jira GTNPORTAL-2746

Problem is fixed at Picketlink IDM level by tuning Hibernate query and filter by attribute values directly in HQL. Previously it was using method "filterByAttributeValues" which select all users from database and then filter them via for cycle, which was very uneffective. 

I am attaching file picketlink-idm-hibernate-1.4.1.CR01-SNAPSHOT.jar , which can be added into GATEIN_HOME/modules/org/gatein/lib/main/ instead of original file picketlink-idm-hibernate-*.jar. (Dependency need to be updated in GATEIN_HOME/modules/org/gatein/lib/main/module.xml)

Comment 2 JBoss JIRA Server 2012-12-04 09:55:25 UTC
Marek Posolda <mposolda> made a comment on jira GTNPORTAL-2746

I am not fixing jira as currently it's available only in my local github fork https://github.com/mposolda/picketlink-idm/commit/1a34e2fdce6633363f6facc8f3805a777854465d . Will be fixed when issue is backported to plidm mainstream and dependency updated in GateIn portal.

Comment 3 JBoss JIRA Server 2012-12-04 12:17:32 UTC
Michal Vanco <mvanco> made a comment on jira GTNPORTAL-2746

Patch verified on JPP 6.0.0 ER03, OOM issue is not present anymore and search is done at acceptable time.

Comment 4 mposolda 2012-12-04 13:46:55 UTC
Thanks Michal! I linked thus BZ with another jira GTNPORTAL-2745 which is also related to manyUsers scenario.

Comment 5 JBoss JIRA Server 2012-12-05 17:12:29 UTC
Marek Posolda <mposolda> updated the status of jira GTNPORTAL-2746 to Resolved

Comment 6 Michal Vanco 2012-12-19 08:22:26 UTC
Verified at JPP 6.0.0 ER04.2