Hi,

I am getting the OutofMemory Error: "java.lang.OutOfMemoryError: Java heap 
space" often in production due to the particular Treemap is taking more memory 
in the JVM.

When i looked into the config files I am having the entity called 
UserQryDocument where i am fetching the data from certain tables.
Again i have a sub entiry called "UserLocation" where i am using the 
CachedSqlEntityProcessor to get the fields from Cache. It seems like it has the 
total of 2,00,000 records total.
processor="CachedSqlEntityProcessor" cacheKey="user_pin" 
cacheLookup="UserQueryDocumentNonAuthor.DocKey">

Like this i have some other different entity and there also i am using this 
CachedSqlEntityProcessor in the sub entity.

But when i looked into the Heap Dump : java_pid57.hprof i am able to see the 
TreeMap is causing the problem.

But not able to find which entity is causing this issue.I am using the IBM Heap 
Ananlyser to look into the Dump.

Can you please let me know is there any other way we can find out which entity 
is causing this issue or any other tool to analyse and debug the Out of Memory 
Issue to find the exact entity is causing this issue.

I have attched the entity in dataconfig.xml and heap Anayser screen shot.


Thanks
P.Yuvaraj Kumar
 <entity name="UserQueryDocumentNonAuthor" dataSource="arcwebds" query="
                        select upper(rtrim(ta.User_PIN)) as DocKey, 
rtrim(ta.User_Pin) as UserPIN, rtrim(ta.Prsn_Id) as PersonID, 
                        rtrim(ta.OPER_DEPT_CODE) as DeptNo, 
                        rtrim(ta.Dept_Name) as DepartmentName, 
                        rtrim(ta.Work_Phon_Nbr) as PhoneNo, 
                        rtrim(ta.WORK_CTRY_NAME) as Country, 
                        rtrim(owning_lab_desc) as LabName, 
                        rtrim(ta.JOB_TITL_NAME) as JobTitle, 
                        rtrim(ta.PRSN_POS_TITL_DS) as BusinessTitle, 
                        URL, Attachment, MimeType, 0 as SORInd,
                        
                        rtrim(taa.User_PIN) as ReportsTo, 
                        rtrim(ta.EMAL_ADDR) as EMAL_ADDR,
                        ta.MMM_EMPL_IND,
                        ta.TF_MEMBER,
                        
                        rtrim(ta.PRSN_LAST_NAME) as PRSN_LAST_NAME,
                        rtrim(ta.PRSN_FRST_NAME) as PRSN_FRST_NAME,
                        lower(rtrim(ta.PRSN_LAST_NAME)) as PersonLastNameSort,
                        lower(rtrim(ta.PRSN_FRST_NAME)) as PersonFirstNameSort,
                        rtrim(ta.PRSN_MID_NAME) as PRSN_MID_NAME,
                        rtrim(ta.PRSN_PREF_FRST_NM) as PRSN_PREF_FRST_NM,
                        rtrim(ta.PRSN_PRFX_NAME) as PRSN_PRFX_NAME,
                        rtrim(ta.SRNM_SFX_NAME) as SRNM_SFX_NAME,
                        
                        rtrim(ta.BLDG_NBR) as BLDG_NBR,
                        rtrim(ta.BLDG_FLR_NBR) as BLDG_FLR_NBR,
                        rtrim(ta.BLDG_WING_CODE) as BLDG_FLR_NBR,
                        rtrim(ta.LOC_DESC) as LOC_DESC,
                        ta.ACTV_STUS_IND

                        FROM tableA ta With(NOLOCK)
                        left outer join (select * from tableSkillsA ta 
With(NOLOCK) where ta.RecordID in (select MAX(RecordID) as recordID FROM tableB 
tb With(NOLOCK) group by UserPIN)) skil on skil.PersonID = ta.Prsn_Id
                        left outer join [dbo].[lookup_owning_lab] ownl 
With(NOLOCK) on ta.LAB_CODE = ownl.owning_lab_code and ownl.active_ind = 1
                        left outer join user taa With(NOLOCK) on ta.SUPV_ID = 
taa.PRSN_ID
                        where not exists (select hasContent.user_pin from 
[lookup_user_has_intek_content] hasContent With(NOLOCK) where 
hasContent.user_pin = ta.User_Pin)
                        and not exists (select hasGMPOContent.Prsn_Id from 
[lookup_user_has_gmpo_content] hasGMPOContent With(NOLOCK) where 
hasGMPOContent.Prsn_Id = ta.Prsn_Id)
                        and not exists (select hasIronwoodContent.user_pin from 
[lookup_user_has_ironwood_content] hasIronwoodContent With(NOLOCK) where 
hasIronwoodContent.user_pin = ta.User_Pin)
                        and ta.ACTV_STUS_IND = 'A' and 
                        ('${dataimporter.request.clean}' != 'false' OR 
ta.LAST_CHNG_TMSP &gt; '${dataimporter.request.deltaDate}' OR skil.update_date 
&gt; '${dataimporter.request.deltaDate}'
                        or exists 
                        ( 
                                select it.item_id
                                        from dbo.item it  With(NOLOCK), 
                                        dbo.tblAuthor auth  With(NOLOCK) 
                                        where it.item_id = auth.item_id 
                                        and (auth.AuthorPIN = ta.User_Pin or 
auth.AuthorPersonID = ta.Prsn_Id)
                                        and it.update_date > 
'${dataimporter.request.deltaDate}'
                        )
                        )"
                        pk="DocKey" transformer="RegexTransformer, 
com.mmm.wc2.solr.transformers.BlobTransformer, HTMLStripTransformer">
                        <field column="DocKey" name="DocKey" />
                        <field column="UserPIN" name="UserPIN" />
                        <field column="PersonID" name="PersonID" />
            <field column="URL" name="URL" />
            <field column="DeptNo" name="DeptNo" />
            <field column="DepartmentName" name="DepartmentNameSearchField"/>
            <field column="PhoneNo" name="PhoneNo" />
            <field column="Country" name="Country" />
            <field column="LabName" name="LabNameSearchField" />
            <field column="JobTitle" name="JobTitleSearchField" />
            <field column="BusinessTitle" name="BusinessTitle" />
                        <field column="Attachment" name="Attachment" 
blob="true" mimeTypeFieldName="MimeType" stripHTML="true" />
                        <field column="MimeType" name="MimeType" />
                        <field column="SORInd" name="SORInd" />
                        <field column="ReportsTo" name="ReportsTo" />
                        <field column="EMAL_ADDR" name="EmailAddress" />
                        <field column="MMM_EMPL_IND" 
name="MMMEmployeeIndicator" />
                        <field column="TF_MEMBER" 
name="TechForumMemberIndicator" />

                        <field column="PRSN_LAST_NAME" name="PersonLastName" />
                        <field column="PRSN_FRST_NAME" name="PersonFirstName" />
                        <field column="PersonLastNameSort" 
name="PersonLastNameSort" />
                        <field column="PersonFirstNameSort" 
name="PersonFirstNameSort" />
                        <field column="PRSN_MID_NAME" name="PersonMiddleName" />
                        <field column="PRSN_PREF_FRST_NM" 
name="PersonPreferredFirstName" />
                        <field column="PRSN_PRFX_NAME" name="PersonPrefixName" 
/>
                        <field column="SRNM_SFX_NAME" name="PersonSuffixName" />
                        <field column="BLDG_NBR" name="BuildingNumber" />
                        <field column="BLDG_FLR_NBR" name="BuildingFloorNumber" 
/>
                        <field column="BLDG_WING_CODE" name="BuildingWingCode" 
/>
                        <field column="LOC_DESC" name="LocationDescription" />
                        <field column="ACTV_STUS_IND" 
name="ActiveStatusIndicator" />
                        
                        <entity name="UserLocation" dataSource="arcwebds" 
query="
                                        select upper(rtrim(user_pin)) as 
user_pin, cast(latitude as varchar(15)) + ',' + cast(longitude as varchar(15)) 
as PersonLocation 
                                        from [dbo].[v_arc_user_location] ta, 
[dbo].[v_site_location] tb
                                        where ta.userLocation = tb.Location
                                        " 
                                        processor="CachedSqlEntityProcessor" 
cacheKey="user_pin" cacheLookup="UserQueryDocumentNonAuthor.DocKey">
                                        <!-- and user_pin = 
'${UserQueryDocumentNonAuthor.UserPIN}' -->
                                <field column="PersonLocation" 
name="PersonLocation" />
            </entity>
        </entity>
    

Reply via email to