简体   繁体   English

下载JR报告时Java堆空间内存错误

[英]Java heap space memory error while while downloading JR report

I am fetching data from data base (records in table 911830) and adding it to JR report for 1000 records its working fine. 我正在从数据库(表911830中的记录)中获取数据,并将其添加到JR报告中以获取1000条记录,其工作正常。 When I exceed or some time its giving Java heap space memory error as title of this issue it is related to Java heap memory, but I increase it 3Gb as (Xms3072m-Xmx3072m). 当我超过或在某个时候将其赋予Java堆空间内存错误作为此问题的标题时,它与Java堆内存有关,但我将其增加了3Gb(Xms3072m-Xmx3072m)。 But still getting same error 但是仍然出现相同的错误

My system configuration is as below:: 我的系统配置如下:

  1. 64 bit is fine 64位就可以了
  2. Redhat/ CentOS (latest versions) Redhat / CentOS(最新版本)
  3. 120GB with RAID configuration 具有RAID配置的120GB
  4. 2GB of RAM and a 2CPU machine 2GB RAM和2CPU机器

console error :: 控制台错误::

Aug 26, 2012 7:11:14 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet `enter code here`jsp threw exception
java.lang.OutOfMemoryError: Java heap space
    at com.opensymphony.module.sitemesh.html.util.CharArray.grow(CharArray.java:267)
    at com.opensymphony.module.sitemesh.html.util.CharArray.append(CharArray.java:117)
    at com.opensymphony.module.sitemesh.html.tokenizer.Parser$ReusableToken.writeTo(Parser.java:343)
    at com.opensymphony.module.sitemesh.html.State.handleText(State.java:64)
    at com.opensymphony.module.sitemesh.html.HTMLProcessor$2.text(HTMLProcessor.java:103)
    at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedText(Parser.java:295)
    at com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.java:109)
    at com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(TagTokenizer.java:33)
    at com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProcessor.java:90)
    at com.opensymphony.module.sitemesh.parser.HTMLPageParser.parse(HTMLPageParser.java:52)
    at com.opensymphony.sitemesh.compatability.PageParser2ContentProcessor.build(PageParser2ContentProcessor.java:51)
    at com.opensymphony.sitemesh.webapp.ContentBufferingResponse.getContent(ContentBufferingResponse.java:54)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:137)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:143)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
Aug 26, 2012 7:11:14 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
java.lang.OutOfMemoryError: Java heap space
    at com.opensymphony.module.sitemesh.html.util.CharArray.grow(CharArray.java:267)
    at com.opensymphony.module.sitemesh.html.util.CharArray.append(CharArray.java:117)
    at com.opensymphony.module.sitemesh.html.tokenizer.Parser$ReusableToken.writeTo(Parser.java:343)
    at com.opensymphony.module.sitemesh.html.State.handleText(State.java:64)
    at com.opensymphony.module.sitemesh.html.HTMLProcessor$2.text(HTMLProcessor.java:103)
    at com.opensymphony.module.sitemesh.html.tokenizer.Parser.parsedText(Parser.java:295)
    at com.opensymphony.module.sitemesh.html.tokenizer.Parser.start(Parser.java:109)
    at com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer.start(TagTokenizer.java:33)
    at com.opensymphony.module.sitemesh.html.HTMLProcessor.process(HTMLProcessor.java:90)
    at com.opensymphony.module.sitemesh.parser.HTMLPageParser.parse(HTMLPageParser.java:52)
    at com.opensymphony.sitemesh.compatability.PageParser2ContentProcessor.build(PageParser2ContentProcessor.java:51)
    at com.opensymphony.sitemesh.webapp.ContentBufferingResponse.getContent(ContentBufferingResponse.java:54)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:137)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:143)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1063)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:801)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)

Have you tried to profile your application? 您是否尝试过分析您的应用程序?

Try to take a memory dump and investigate, maybe you have too many objects in memory of the same type/ some very big objects that eats all your memory. 尝试进行内存转储并进行调查,也许您的相同类型的内存中有太多对象/一些非常大的对象已耗尽了您的所有内存。

You can consider to use JVisualVM or any other profile available at your organization 您可以考虑使用JVisualVM或组织中可用的任何其他配置文件

May be easier than trying to sort the memory dump out would be to try Plumbr . 尝试排序Plumbr可能比尝试解决内存转储要容易。 It is pretty good in spotting memory leaks. 在发现内存泄漏方面非常好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行mapreduce程序时出现“ Java堆空间不足内存错误” - “Java Heap space Out Of Memory Error” while running a mapreduce program 内存不足错误 - 写入Excel时的Java堆空间 - Out of Memory Error - Java Heap Space while writing to Excel 写入文件时出现Java堆空间错误 - java heap space error while writing to a file 内存不足:Java堆空间,但是在查看堆空间时,它最多使用50 MB - Getting Out Of Memory: Java heap space, but while viewing heap space it max uses 50 MB java.lang.OutOfMemoryError:从URL下载大文件时的Java堆空间 - java.lang.OutOfMemoryError: Java heap space while downloading a large file from an URL 使用字符串缓冲区时如何解决Java堆空间错误? - How to resolve Java Heap Space error while using String Buffer? 检查非常长的字符串时Java堆空间错误 - Java Heap space error while checking very very long String 为整数的平方根编写程序时出现 Java 堆空间错误 - Java Heap Space error while writing a program for Square root of an Integer 运行 rjava 时如何处理“Java Heap Space”错误 - How to deal with “Java Heap Space” error while running rjava Java 在创建大量对象的 ArrayList 时出现堆空间错误? - Java heap space error while creating ArrayList of large number of objects?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM