tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: tomcat won't download large files -- out of memory error
Date Fri, 26 Sep 2008 08:47:47 GMT

----- Original Message ----- 
To: "Tomcat Users List" <>
Sent: Friday, September 26, 2008 7:01 AM
Subject: tomcat won't download large files -- out of memory error

>I have some large zip files I want to make available for download.   When I 
>try to download a 70MB file, tomcat is trying to cache these  huge files 
>(it seems).  The result is that downloading them always  fails.  I *want* 
>caching for most everything eg jpegs, html, etc and  I've set tomcat to use 
>up to 1.5GB of memory.
> Is there a way to limit the size of the file that will be cached? It's 
> regrettable that failure to cache a file can't gracefully degrade into 
> just not caching it.
> Sep 25, 2008 9:50:17 PM org.apache.catalina.connector.CoyoteAdapter 
> service
> SEVERE: An exception or error occurred in the container during the 
> request processing
> java.lang.OutOfMemoryError: Java heap space
> at  org .apache 
> .naming.resources.ProxyDirContext.cacheLoad(
> at  org .apache 
> .naming.resources.ProxyDirContext.cacheLookup(
> at  org 
> .apache.naming.resources.ProxyDirContext.lookup( 283)
> at  org 
> .apache.tomcat.util.http.mapper.Mapper.internalMapWrapper( 
> 782)
> at org.apache.tomcat.util.http.mapper.Mapper.internalMap( 626)
> at
> at  org .apache 
> .catalina.connector.CoyoteAdapter.postParseRequest( 
> 444)
> at 
> org.apache.catalina.connector.CoyoteAdapter.service( 
> 284)
> at  org.apache.coyote.http11.Http11Processor.process( 
> 844)
> at org.apache.coyote.http11.Http11Protocol 
> $Http11ConnectionHandler.process(
> at$ 
> 447)
> at
> Lloyd Chambers
> [Mac OS X 10.5.2 Intel, Tomcat 6.0.16]

Lloyd... dont know, its definitely running out of mem, but I'm not sure its 
because of a 70 meg file...
The default static cache size is 10 megs, so its doubtful that TC is caching 
that file...

We run video content on the Lan and some of that stuff is 700 megs on 
standard settings... out of the box settings.
We are still running TC 5.5.25 in production...

I dont know the MAC, but its possible that its just not setting enough 
I guess the MAC has its own TC and its own JRE... so I have no idea how you 
monitor stuff, or what the defaults are.
If it does have the later Sun JRE VisualVM tool... thats a nice way to watch 
what your TC is doing.

Is it been served by tomcats default servlet or from a custom servlet... if 
the later the coder may infact be sticking it all on the heap, very likely 
it will break then.
The default servlet in TC is smarter than that...

I dont think a 70 meg file should pose any problems served as a static 
I would try another TC version just to make sure... and I would ask as well if you dont come right here.

I think you may be seeing a symptom of another problem... ie something else 
is consumed all the memory, and the file down load is the straw that broke 
the camels back. Maybe another test case is in order where you make a little 
webapp with nothing else but the static file in it... if that works, then 
something else in that webapp ate your memory...

Good Luck...

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message