RE: [VOTE] Release Apache Tomcat 8.0.0-RC6
Hi, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Tuesday, December 10, 2013 1:22 AM > > > Any idea what is going on there? Why would Tomcat create such a big > > byte array for a static file? > > Lots of things going on here. > > 1. The content of resources was still being cached on access even if it > was bigger than the maximum object size. > > 2. The test of object size was checking against the total limit for the > cache rather than the single object limit. > > 3. The DefaultServlet was working on assumptions that were true in the > 7.0.x resources implementation but not true in the new 8.0.x > implementation. > > All of the above - and few additional issues spotted along the way - > have been fixed in trunk. > > Thanks for the report. Thanks, Mark. I can confirm that with r1549832, downloading the large static file works as expected. Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.0.0-RC6
On 09/12/2013 21:40, Konstantin Preißer wrote: > With Tomcat 8.0.0-RC6, I seem to have problems serving large static > files in one of my webapps. > > I've run it on a Windows Server 2012 R2 system with Java 1.7.0_45 > (64-Bit) and the NIO HTTP connector. The webapp contains a large > static file with a size of 4,582,875,812 bytes. > > When I try to download that file in the browser, I get the following > exception: > > 09-Dec-2013 22:21:22.511 SEVERE [http-nio-8006-exec-2] > org.apache.catalina.core.StandardWrapperValve.invoke > Servlet.service() for servlet [default] in context with path [] threw > exception java.lang.ArrayIndexOutOfBoundsException: Unable to return > [/temp/file.bin] as a byte array since the resource is > [4,582,875,812] bytes in size which is larger than the maximum size > of a byte array > However, I am unable to reproduce this exception when placing the > file in Tomcat's default ROOT webapp. I suspect that the filters > could have some effect. I think I did not get such errors with the > same webapp and Tomcat 7.0.42. I have not yet tested other Tomcat > versions. The "XUaCompatibleHeaderFilter" in the stacktrace just > appends an "X-UA-Compatible: IE=Edge" header to the response, then > invokes chain.doFilter(request, response). The Tuckey > UrlRewriteFilter is configured to rewrite some URLs that start with a > capital letter (but not the URL which requests the static file). > > Any idea what is going on there? Why would Tomcat create such a big > byte array for a static file? Lots of things going on here. 1. The content of resources was still being cached on access even if it was bigger than the maximum object size. 2. The test of object size was checking against the total limit for the cache rather than the single object limit. 3. The DefaultServlet was working on assumptions that were true in the 7.0.x resources implementation but not true in the new 8.0.x implementation. All of the above - and few additional issues spotted along the way - have been fixed in trunk. Thanks for the report. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.0.0-RC6
Konstantin, On 12/9/13, 4:40 PM, Konstantin Preißer wrote: > The webapp contains a large static file with a size of 4,582,875,812 bytes. I believe that static file is better-described as "huge", "enormous", [bleeping] gigantic. Anything bigger than 2^32 bytes deserves a proper adjective. :) -chris signature.asc Description: OpenPGP digital signature
RE: [VOTE] Release Apache Tomcat 8.0.0-RC6
Hi Mark, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Monday, December 9, 2013 9:19 PM > To: Tomcat Developers List > Subject: [VOTE] Release Apache Tomcat 8.0.0-RC6 > > The proposed Apache Tomcat 8.0.0 release candidate 6 is now available > for voting. > > Given this is a release candidate I am working on the basis that it is > equivalent to an alpha. The main changes since RC5 are: > - Better handling of generic types in the WebSocket 1.0 implementation > - Refactor resource handling for the class loader > - Add Cobertura support to the unit tests > - Remove anti-Jar locking feature and replace it with open stream > tracking > - Update to Commons Pool 2.0 release > - Complete refactoring of TLD handling including caching of parsed TLDs > - More consistent handling of XML validation options > - Numerous bug fixes > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.0-RC6/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-029/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tags/TOMCAT_8_0_0_RC6/ > > The proposed 8.0.0-RC6 release is: > [ ] Broken - do not release > [ ] Alpha - go ahead and release as 8.0.0-RC6 alpha With Tomcat 8.0.0-RC6, I seem to have problems serving large static files in one of my webapps. I've run it on a Windows Server 2012 R2 system with Java 1.7.0_45 (64-Bit) and the NIO HTTP connector. The webapp contains a large static file with a size of 4,582,875,812 bytes. When I try to download that file in the browser, I get the following exception: 09-Dec-2013 22:21:22.511 SEVERE [http-nio-8006-exec-2] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [] threw exception java.lang.ArrayIndexOutOfBoundsException: Unable to return [/temp/file.bin] as a byte array since the resource is [4,582,875,812] bytes in size which is larger than the maximum size of a byte array at org.apache.catalina.webresources.FileResource.getContent(FileResource.java:143) at org.apache.catalina.webresources.CachedResource.getContent(CachedResource.java:235) at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1793) at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:919) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:400) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at common.XUaCompatibleHeaderFilter.doFilter(XUaCompatibleHeaderFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:76) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:90) at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:180) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:646) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.jav
Re: [VOTE] Release Apache Tomcat 8.0.0-RC6
On 09/12/2013 20:18, Mark Thomas wrote: > The proposed Apache Tomcat 8.0.0 release candidate 6 is now available > for voting. > > Given this is a release candidate I am working on the basis that it is > equivalent to an alpha. The main changes since RC5 are: > - Better handling of generic types in the WebSocket 1.0 implementation > - Refactor resource handling for the class loader > - Add Cobertura support to the unit tests > - Remove anti-Jar locking feature and replace it with open stream > tracking > - Update to Commons Pool 2.0 release > - Complete refactoring of TLD handling including caching of parsed TLDs > - More consistent handling of XML validation options > - Numerous bug fixes > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.0.0-RC6/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-029/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tags/TOMCAT_8_0_0_RC6/ > > The proposed 8.0.0-RC6 release is: > [ ] Broken - do not release > [X] Alpha - go ahead and release as 8.0.0-RC6 alpha Unit tests pass win 64-bit Java 7 on Windows, Linux and OSX. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org