KNOWLEDGE BASE

Error occurred while building search index Caused by: java.lang.OutOfMemoryError: Java heap space


Published: 21 Jan 2016
Last Modified Date: 10 Apr 2017

Issue

When starting Tableau Server in an environment with a lot of sites (500 approx.), rebuilding the index fails for some sites and the following error message gets displayed:
java.lang.OutOfMemoryError: Java heap space.

Environment

  • Tableau Server 9.0.4
  • High number of sites (500 >)

Resolution

Run the following command to increase Java Heap memory and tweak the backgrounder:
tabadmin set java.heap.size "512"  tabadmin set backgrounder.vmopts "'-XX:+UseConcMarkSweepGC -Xmx1024m'"  tabadmin config  tabadmin restart

Additional Information

Found in backgrounder.log:

2016-01-18 12:58:45.648 +0000 (,,,) pool-4-thread-1 : WARN com.tableausoftware.domain.asyncjobs.AsyncJobService - Job failed, id: 263 
com.tableausoftware.domain.exceptions.SearchServiceException: Error occured while building search index (errorCode=200002) 
at com.tableausoftware.domain.solr.SearchService.rebuildIndexes(SearchService.java:161) 
[...] 
Caused by: org.postgresql.util.PSQLException: Ran out of memory retrieving query results. 
[...] 
Caused by: java.lang.OutOfMemoryError: Java heap space 
2016-01-18 12:58:45.664 +0000 (,,,) pool-4-thread-1 : INFO com.tableausoftware.domain.asyncjobs.AsyncJobService - Async job id: [263], type: [Rebuild Search Indices], status: [failed] 
Did this article resolve the issue?