tomcat-users mailing list archives

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

----- Original Message ----- 
From: "DIGLLOYD INC" <diglloyd1@diglloyd.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
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(ProxyDirContext.java:1571)
> at  org .apache 
> .naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1449)
> at  org 
> .apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java: 283)
> at  org 
> .apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java: 
> 782)
> at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java: 626)
> at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:516)
> at  org .apache 
> .catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java: 
> 444)
> at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 
> 284)
> 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: 
> 447)
> at java.lang.Thread.run(Thread.java:613)
>
>
> Lloyd Chambers
> http://diglloyd.com
>
> [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 
memory...
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 
file...
I would try another TC version just to make sure... and I would ask 
Java-dev@lists.apple.com 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...

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message