Hi community!
I have spent much time trying to figure out the problem I get with large file uploading.
I use the UploadItem control to upload the file >300M into the database. I use datasource for the database table binding. That works perfectly for small and medium files, I've tested it for files about 45M. But for files more than 300M I get the following error in the log:
I've tried to increase the JVM heap size with -DXmx1024M but think that's not a good idea to increase the heap size ad infinitum. Anyway even 1024M heap size didn't help.
Possible it is not a problem of smartGWT and I should to realize my custom servlet for uploading but maybe are there any ways to solve it?
any suggests will be very much appreciated
I have spent much time trying to figure out the problem I get with large file uploading.
I use the UploadItem control to upload the file >300M into the database. I use datasource for the database table binding. That works perfectly for small and medium files, I've tested it for files about 45M. But for files more than 300M I get the following error in the log:
Code:
=== 2010-07-14 13:20:48,468 [l0-4] ERROR IDACall - Top-level servlet error: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.io.ByteArrayOutputStream.write(Unknown Source) at java.io.FilterOutputStream.write(Unknown Source) at com.isomorphic.io.ByteCountingOutputStream.write(ByteCountingOutputStream.java:45) at java.io.FilterOutputStream.write(Unknown Source) at org.apache.commons.fileupload.util.Streams.copy(Streams.java:101) at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:362) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:310) at com.isomorphic.servlet.ISCHttpServletRequest.parseRequest(ISCHttpServletRequest.java:217) at com.isomorphic.servlet.ISCHttpServletRequest.getFileParams(ISCHttpServletRequest.java:146) at com.isomorphic.servlet.ISCHttpServletRequest.getUploadedFile(ISCHttpServletRequest.java:246) at com.isomorphic.datasource.DSRequest.parseUploadedFiles(DSRequest.java:401) at com.isomorphic.datasource.DSRequest.<init>(DSRequest.java:352) at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:1283) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:250) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:90) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
I've tried to increase the JVM heap size with -DXmx1024M but think that's not a good idea to increase the heap size ad infinitum. Anyway even 1024M heap size didn't help.
Possible it is not a problem of smartGWT and I should to realize my custom servlet for uploading but maybe are there any ways to solve it?
any suggests will be very much appreciated
Comment