java.lang.OutOfMemoryError: Java heap space

Atlassian JIRA | Diane Yu | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The projecttab in JIRA performs this query: {code} select revisions where (comment matches 'PROJECTKEY' or p4:jobid =~ '(^|[^a-zA-Z0-9-])PROJECTKEY-[0-9]+($|[^a-zA-Z0-9-])') and date > 2009-11-24T15:43:09Z return reviews {code} This can cause fisheye to heap dump OOM...possibly because too many results came back. We can use [EyeQL|http://confluence.atlassian.com/display/FISHEYE/EyeQL+Reference+Guide] to restrict the search to a folder since each project is mapped to a single project folder in Studio. The alternative is to use the limit clause in EyeQL. {code} ERROR - Error for /source/api/rest/query java.lang.OutOfMemoryError: Java heap space at org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:324) at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:166) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:659) at org.apache.lucene.index.MultiSegmentReader.document(MultiSegmentReader.java:257) at org.apache.lucene.index.IndexReader.document(IndexReader.java:525) at com.cenqua.fisheye.lucene.join.DocumentRightJoinEnum.hasNext(DocumentRightJoinEnum.java:43) at com.cenqua.fisheye.infinitydb.query3.LuceneJoinQuery3.asItemSpace(LuceneJoinQuery3.java:56) at com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63) at com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63) at com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63) at com.cenqua.fisheye.infinitydb.query3.Query3$1.perform(Query3.java:40) at com.cenqua.fisheye.lucene.LuceneConnection.withReader(LuceneConnection.java:122) at com.cenqua.fisheye.infinitydb.query3.Query3.asItemSpace(Query3.java:38) at com.cenqua.fisheye.search.query.BaseQueryEvaluator.performQuery(BaseQueryEvaluator.java:63) at com.cenqua.fisheye.search.SearchManager.executeQueryImpl(SearchManager.java:52) at com.cenqua.fisheye.search.SearchManager.access$000(SearchManager.java:11) at com.cenqua.fisheye.search.SearchManager$1.createValue(SearchManager.java:34) at com.cenqua.fisheye.search.SearchManager$1.createValue(SearchManager.java:39) at com.cenqua.fisheye.util.LRUCache.createValueForNode(LRUCache.java:156) at com.cenqua.fisheye.util.LRUCache.get(LRUCache.java:109) at com.cenqua.fisheye.search.SearchManager.getFromCache(SearchManager.java:44) at com.cenqua.fisheye.search.SearchManager.runQuery(SearchManager.java:27) at com.cenqua.fisheye.api.ApiImplementation.doQuery(ApiImplementation.java:234) at com.cenqua.fisheye.api.ApiImplementation.handleCommand(ApiImplementation.java:201) at com.cenqua.fisheye.api.ApiImplementation.handle(ApiImplementation.java:181) at com.cenqua.fisheye.api.BaseApiServlet.doPost(BaseApiServlet.java:25) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1144) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) {code}

    Atlassian JIRA | 7 years ago | Diane Yu
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    The projecttab in JIRA performs this query: {code} select revisions where (comment matches 'PROJECTKEY' or p4:jobid =~ '(^|[^a-zA-Z0-9-])PROJECTKEY-[0-9]+($|[^a-zA-Z0-9-])') and date > 2009-11-24T15:43:09Z return reviews {code} This can cause fisheye to heap dump OOM...possibly because too many results came back. We can use [EyeQL|http://confluence.atlassian.com/display/FISHEYE/EyeQL+Reference+Guide] to restrict the search to a folder since each project is mapped to a single project folder in Studio. The alternative is to use the limit clause in EyeQL. {code} ERROR - Error for /source/api/rest/query java.lang.OutOfMemoryError: Java heap space at org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:324) at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:166) at org.apache.lucene.index.SegmentReader.document(SegmentReader.java:659) at org.apache.lucene.index.MultiSegmentReader.document(MultiSegmentReader.java:257) at org.apache.lucene.index.IndexReader.document(IndexReader.java:525) at com.cenqua.fisheye.lucene.join.DocumentRightJoinEnum.hasNext(DocumentRightJoinEnum.java:43) at com.cenqua.fisheye.infinitydb.query3.LuceneJoinQuery3.asItemSpace(LuceneJoinQuery3.java:56) at com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63) at com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63) at com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63) at com.cenqua.fisheye.infinitydb.query3.Query3$1.perform(Query3.java:40) at com.cenqua.fisheye.lucene.LuceneConnection.withReader(LuceneConnection.java:122) at com.cenqua.fisheye.infinitydb.query3.Query3.asItemSpace(Query3.java:38) at com.cenqua.fisheye.search.query.BaseQueryEvaluator.performQuery(BaseQueryEvaluator.java:63) at com.cenqua.fisheye.search.SearchManager.executeQueryImpl(SearchManager.java:52) at com.cenqua.fisheye.search.SearchManager.access$000(SearchManager.java:11) at com.cenqua.fisheye.search.SearchManager$1.createValue(SearchManager.java:34) at com.cenqua.fisheye.search.SearchManager$1.createValue(SearchManager.java:39) at com.cenqua.fisheye.util.LRUCache.createValueForNode(LRUCache.java:156) at com.cenqua.fisheye.util.LRUCache.get(LRUCache.java:109) at com.cenqua.fisheye.search.SearchManager.getFromCache(SearchManager.java:44) at com.cenqua.fisheye.search.SearchManager.runQuery(SearchManager.java:27) at com.cenqua.fisheye.api.ApiImplementation.doQuery(ApiImplementation.java:234) at com.cenqua.fisheye.api.ApiImplementation.handleCommand(ApiImplementation.java:201) at com.cenqua.fisheye.api.ApiImplementation.handle(ApiImplementation.java:181) at com.cenqua.fisheye.api.BaseApiServlet.doPost(BaseApiServlet.java:25) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1144) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) {code}

    Atlassian JIRA | 7 years ago | Diane Yu
    java.lang.OutOfMemoryError: Java heap space

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Java heap space

      at org.apache.lucene.index.FieldsReader.addField()
    2. Lucene
      IndexReader.document
      1. org.apache.lucene.index.FieldsReader.addField(FieldsReader.java:324)
      2. org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:166)
      3. org.apache.lucene.index.SegmentReader.document(SegmentReader.java:659)
      4. org.apache.lucene.index.MultiSegmentReader.document(MultiSegmentReader.java:257)
      5. org.apache.lucene.index.IndexReader.document(IndexReader.java:525)
      5 frames
    3. com.cenqua.fisheye
      BaseApiServlet.doPost
      1. com.cenqua.fisheye.lucene.join.DocumentRightJoinEnum.hasNext(DocumentRightJoinEnum.java:43)
      2. com.cenqua.fisheye.infinitydb.query3.LuceneJoinQuery3.asItemSpace(LuceneJoinQuery3.java:56)
      3. com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63)
      4. com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63)
      5. com.cenqua.fisheye.infinitydb.query3.BooleanQuery3.asItemSpace(BooleanQuery3.java:63)
      6. com.cenqua.fisheye.infinitydb.query3.Query3$1.perform(Query3.java:40)
      7. com.cenqua.fisheye.lucene.LuceneConnection.withReader(LuceneConnection.java:122)
      8. com.cenqua.fisheye.infinitydb.query3.Query3.asItemSpace(Query3.java:38)
      9. com.cenqua.fisheye.search.query.BaseQueryEvaluator.performQuery(BaseQueryEvaluator.java:63)
      10. com.cenqua.fisheye.search.SearchManager.executeQueryImpl(SearchManager.java:52)
      11. com.cenqua.fisheye.search.SearchManager.access$000(SearchManager.java:11)
      12. com.cenqua.fisheye.search.SearchManager$1.createValue(SearchManager.java:34)
      13. com.cenqua.fisheye.search.SearchManager$1.createValue(SearchManager.java:39)
      14. com.cenqua.fisheye.util.LRUCache.createValueForNode(LRUCache.java:156)
      15. com.cenqua.fisheye.util.LRUCache.get(LRUCache.java:109)
      16. com.cenqua.fisheye.search.SearchManager.getFromCache(SearchManager.java:44)
      17. com.cenqua.fisheye.search.SearchManager.runQuery(SearchManager.java:27)
      18. com.cenqua.fisheye.api.ApiImplementation.doQuery(ApiImplementation.java:234)
      19. com.cenqua.fisheye.api.ApiImplementation.handleCommand(ApiImplementation.java:201)
      20. com.cenqua.fisheye.api.ApiImplementation.handle(ApiImplementation.java:181)
      21. com.cenqua.fisheye.api.BaseApiServlet.doPost(BaseApiServlet.java:25)
      21 frames
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    5. Jetty Server
      ServletHandler$Chain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      2. org.mortbay.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1144)
      2 frames
    6. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      2 frames