Bug 835457

Summary: Reindex operation causes java.lang.OutOfMemoryError with large tables
Product: [Retired] Zanata Reporter: David Mason <damason>
Component: Component-PersistenceAssignee: David Mason <damason>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: urgent    
Version: 1.6CC: hpeters, sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 1.6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.6.1-SNAPSHOT (20120702-0014) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-03 05:27:54 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 David Mason 2012-06-26 08:26:31 UTC
Description of problem:
When reindexing a table with many rows, a java.lang.OutOfMemoryError occurs and the table is not indexed. Subsequent tables may still be indexed normally.

Version-Release number of selected component (if applicable):
1.6

How reproducible:
Depends on size of data and available VM heap space. Approximately 100% of the time with 1,200,000 HTextFlowTargets with 512M of heap, but does not occur with same data when the VM is given 1024M of heap.

Steps to Reproduce:
1.Sign in as an admin user
2.Navigate to search administration page and begin a 'reindex' for one or more tables
3.Look at server log for about 2 minutes
  
Actual results:
Exception stack traces shown in log, caused by java.lang.OutOfMemoryError
UI shows halted progress bar and message about failed reindex

Expected results:
Reindex completes with no errors

Additional info:
Memory runs out during criteria query, before the indexing loop begins.

Comment 1 David Mason 2012-06-27 03:41:42 UTC
Fixed in 1.6.1-SNAPSHOT

It is still advised to run reindex when server load is minimal, as it will cause increased memory use (for example, in tests with ~1,200,000 HTextFlowTarget, memory usage increased by up to 200M over average usage)

See: https://github.com/zanata/zanata/commit/52720c0509253ba1c75dd380f9f75422769fa6e6

Comment 2 Ding-Yi Chen 2012-07-02 06:41:19 UTC
VERIFIED with Zanata version 1.6.1-SNAPSHOT (20120702-0014)
Zanata version 1.7-SNAPSHOT (20120702-0025)

However, in some cases, I did encounter some "No space left on the device" (Out of disk space"). IMHO, it is not in the scope of this bug. But it should be good to provide some estimation of "recommend disk space for production server".

Should be also in future test plan.

Comment 3 Sean Flanigan 2012-07-03 05:19:33 UTC
*** Bug 828605 has been marked as a duplicate of this bug. ***