Java Stack Tracing Saving 7MB Attachment
Dear xwiki-users, We are getting a Java exception when saving a 7MB attachment. The attachment appears to be attached properly, since it appears in the attachment list and can be downloaded after the error. However, after attaching four or five files the server becomes so unresponsive that a restart is required. Configuration Info: OS: Windows 2000 Server RAM: 1GB JDK: 1.5.0_8 App Server: JBoss 4.0.4 Database: MySQL 4.1.21 Note that JBoss is run with -Xmx 512M, and increasing that to -Xmx 1024M has no effect. I've gone through the attachment documentation and mailing list archives and didn't see any references to a similar problem. Any help would be appreciated - I plan to checkout the code and see what's happening! Here is the stack trace: A problem occured while trying to service your request. Please contact the support if this happens again. Detailed information: Error number 0 in 11: Uncaught exception Wrapped Exception: Java heap space com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception Wrapped Exception: Java heap space at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:224) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:421) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 226) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodi ngFilter.java:127) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte r.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs sociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j ava:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86 9) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc essConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker Thread.java:112) at java.lang.Thread.run(Thread.java:595) Wrapped Exception: java.lang.OutOfMemoryError: Java heap space Thanks, Nathan Smith
Get more RAM? I've observed before, when the java heap becomes significantly larger than the amount of real memory available, garbage collection can begin to run so slowly that the JVM becomes unresponsive and eventually dies. Was in a different environment and with (I think) JDK 1.3, but the symptoms were very similar to what you are observing here. On 17 Oct 2006, at 00:11, Smith, Nathan wrote:
Dear xwiki-users,
We are getting a Java exception when saving a 7MB attachment. The attachment appears to be attached properly, since it appears in the attachment list and can be downloaded after the error. However, after attaching four or five files the server becomes so unresponsive that a restart is required. Configuration Info:
OS: Windows 2000 Server RAM: 1GB JDK: 1.5.0_8 App Server: JBoss 4.0.4 Database: MySQL 4.1.21
Note that JBoss is run with -Xmx 512M, and increasing that to -Xmx 1024M has no effect.
I've gone through the attachment documentation and mailing list archives and didn't see any references to a similar problem. Any help would be appreciated - I plan to checkout the code and see what's happening!
Here is the stack trace: A problem occured while trying to service your request. Please contact the support if this happens again.
Detailed information:
Error number 0 in 11: Uncaught exception Wrapped Exception: Java heap space com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception Wrapped Exception: Java heap space at com.xpn.xwiki.web.ViewEditAction.execute (ViewEditAction.java:224) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestProcessor.java:421) at org.apache.struts.action.RequestProcessor.process (RequestProcessor.java:226) at org.apache.struts.action.ActionServlet.process (ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doPost (ActionServlet.java:415) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 717) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter (SetCharacterEncodingFilter.java:127) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke (SecurityAssociationValve.java:175) at org.jboss.web.tomcat.security.JaccContextValve.invoke (JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: 664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run (MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Wrapped Exception: java.lang.OutOfMemoryError: Java heap space Thanks, Nathan Smith
-- You receive this message as a subscriber of the xwiki- [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
Hi, Am Di, den 17.10.2006 schrieb Smith, Nathan um 0:11:
Dear xwiki-users,
We are getting a Java exception when saving a 7MB attachment. The attachment appears to be attached properly, since it appears in the attachment list and can be downloaded after the error. However, after attaching four or five files the server becomes so unresponsive that a restart is required. Configuration Info:
OS: Windows 2000 Server RAM: 1GB JDK: 1.5.0_8 App Server: JBoss 4.0.4 Database: MySQL 4.1.21
Note that JBoss is run with -Xmx 512M, and increasing that to -Xmx 1024M has no effect.
To set the max memory of a java VM to the maximum of the physical space isn't a good idea. I'm not sure how windows react, but under linux the machine is going under big pressure and works only with the swap daemon. Last time I tried this our linux server has a short-time load of >38 :-(. To get an idea what the real problem is, isn't easy. Not in all cases the error message is correct and heap space the problem. If you have the possibility try more physical memory in your machine. For a server 1 GB is not very much. If this doesn't help or not possible you have to investigate more time in the analysis of log messages of the garbage collector. You get more information about the memory usage if you switch on GC logs with -verbose:gc
Bye Frank
To confirm and to get a little more info, you could try running with -verbosegc to see how much time is really being spent in GC and how the amount of available memory evolves. On 16/10/06, Frank Haefemeier <[email protected]> wrote:
Hi,
Am Di, den 17.10.2006 schrieb Smith, Nathan um 0:11:
Dear xwiki-users,
We are getting a Java exception when saving a 7MB attachment. The attachment appears to be attached properly, since it appears in the attachment list and can be downloaded after the error. However, after attaching four or five files the server becomes so unresponsive that a restart is required. Configuration Info:
OS: Windows 2000 Server RAM: 1GB JDK: 1.5.0_8 App Server: JBoss 4.0.4 Database: MySQL 4.1.21
Note that JBoss is run with -Xmx 512M, and increasing that to -Xmx 1024M has no effect.
To set the max memory of a java VM to the maximum of the physical space isn't a good idea. I'm not sure how windows react, but under linux the machine is going under big pressure and works only with the swap daemon. Last time I tried this our linux server has a short-time load of >38 :-(.
To get an idea what the real problem is, isn't easy. Not in all cases the error message is correct and heap space the problem.
If you have the possibility try more physical memory in your machine. For a server 1 GB is not very much. If this doesn't help or not possible you have to investigate more time in the analysis of log messages of the garbage collector. You get more information about the memory usage if you switch on GC logs with -verbose:gc
Bye Frank
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
participants (4)
-
Frank Haefemeier -
Jonathan Essex -
Robin Fernandes -
Smith, Nathan