Page 1 of 1

Howto Increase 'Java heap space'

PostPosted:Sun Jul 06, 2008 2:20 am
by fish
this happen after i increased the maximum uploaded size. the file can be uploaded but cant be opened. it seems i need to increase the \'java heap space\' as well. the problem is i cant managed to find where to change this number. pls assist
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

java.lang.OutOfMemoryError: Java heap space
org.apache.commons.io.output.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:207)
org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:218)
es.git.openkm.module.direct.DirectDocumentModule.getContent(DirectDocumentModule.java:367)
es.git.openkm.api.OKMDocument.getContent(OKMDocument.java:100)
es.git.openkm.frontend.server.OKMDownloadServlet.service(OKMDownloadServlet.java:88)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.

thanx in advance

Re:Howto Increase 'Java heap space'

PostPosted:Tue Jul 08, 2008 7:20 am
by tidus2728
Hi,

Have you checked if your server has sufficient RAM to adjust to your increased file upload limit? Also, how big is file being uploaded?

Thanks.

Re:Howto Increase 'Java heap space'

PostPosted:Tue Jul 08, 2008 8:15 am
by pavila
Try adding JAVA_OPTS=\"-Xms256m -Xmx1024m -XX:MaxPermSize=256m\" in run.sh (or run.bat) file. For more info, look at Java forums.