3 Replies Latest reply on Mar 16, 2011 3:23 PM by Val Sw

    Large File upload problem

    Ali Gohar Newbie

      Hi,


      I am using rich fileUpload component to upload the files. Small files upload fine and I am able to upload files upto 7 MB but when i try to upload a bit larger file like 10MB or 20MB, I get exception after around 20 sec and my listener method is not get called at all.


      org.ajax4jsf.exception.FileUploadException: IO Error parsing multipart request
              at org.ajax4jsf.request.MultipartRequest.parseRequest(MultipartRequest.java:498)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:339)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              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.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.SocketTimeoutException: Read timed out
              at java.net.SocketInputStream.socketRead0(Native Method)
              at java.net.SocketInputStream.read(SocketInputStream.java:129)
              at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:716)
              at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:746)
              at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:116)
              at org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:675)
              at org.apache.coyote.Request.doRead(Request.java:428)
              at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:297)
              at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:405)
              at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:312)
              at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:162)
              at org.ajax4jsf.request.MultipartRequest.parseRequest(MultipartRequest.java:360)
      



      I only get this error when my application is deployed to a remote server, but on localhost it works fine and i can upload 20MB file easily. I had not set any maxRequestSize, then i tried setting maximum size to 25MB but it still doesn't work


          <filter>
              <filter-name>Seam Filter</filter-name>
              <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
                      <init-param>
                              <param-name>maxRequestSize</param-name>
                      <param-value>26214400</param-value>                 
                      </init-param>
                      <init-param>
                              <param-name>createTempFiles</param-name>
                              <param-value>true</param-value>
                      </init-param>
          </filter>
      



      Can anybody please let me know what I am doing? I am really stuck any help will be highly appreciated.


      Thank you