You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Fabrizio Nesti <ne...@medialab.sissa.it> on 2003/12/01 14:36:57 UTC

Uploading large files - out of memory exception

Dear tomcat developers,

I've noticed a problem while uploading files with tomcat 4.1.x.

- When uploading large files (say larger than 10MB) tomcat throws an out
  of memory exception.

- The problem can be avoided raising the memory allocation (as found in
  other similar messages, -Xms128m -Xmx512m) but this is not a solution,
  since it depends on the memory and just makes the limit higher.

I do not know how the actual download works (we are using the
EchoPoint fileupload component, for that matters) but it seems that
the whole file is slurped in memory _before_ passing the request to a
user servlet. Indeed it seems that our download component is never
invoked (see the error below).

Is there a configuration option to avoid this behavior, or there's
nothing to do but limit the filesize?

Thanks in advance for any clue and
cheers,
Fabrizio


PS: The error:

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

exception

javax.servlet.ServletException: Servlet execution threw an exception
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)
        at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)
        at java.lang.Thread.run(Thread.java:536)

root cause

java.lang.OutOfMemoryError



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org