Hi Mark,

> -----Original Message-----
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: Thursday, December 12, 2013 12:28 AM


> > The proposed 8.0.0-RC7 release is:
> > [ ] Broken - do not release
> > [ ] Alpha - go ahead and release as 8.0.0-RC7 alpha


While the issue with large static files that I got with 8.0.0-RC6 is now solved 
when using the http (NIO) connector, I got another problem with downloading 
large files on Tomcat 8.0.0-RC7 when using the AJP NIO connector.

I was using IIS 8.5 on Windows Server 2012 R2 with Java 1.7.0_45 x64, and 
configured the ISAPI Redirector 1.2.37 to forward all requests to Tomcat.


1)

I placed a static file with a size of 208,687,239 bytes into a web application. 
If I request this file over Tomcat's HTTP connector, everything works. But if I 
request it over IIS's HTTP connector (which forwards the request to Tomcat over 
AJP), then the first time I get an download dialog in the browser (I canceled 
it), but Tomcat starts to use ~ 100% CPU in one core. If I request the file 
again, I get lots of OOMs in Tomcat's log:


14-Dec-2013 13:09:56.960 SEVERE [ajp-nio-8019-exec-8] 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun 
 java.lang.OutOfMemoryError: Java heap space
        at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
        at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
        at 
org.apache.coyote.ajp.AbstractAjpProcessor.addToBuffers(AbstractAjpProcessor.java:1590)
        at 
org.apache.coyote.ajp.AbstractAjpProcessor.writeData(AbstractAjpProcessor.java:1582)
        at 
org.apache.coyote.ajp.AbstractAjpProcessor.access$200(AbstractAjpProcessor.java:62)
        at 
org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(AbstractAjpProcessor.java:1724)
        at org.apache.coyote.Response.doWrite(Response.java:520)
        at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:391)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:426)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
        at 
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:421)
        at 
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:409)
        at 
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
        at 
org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:1951)
        at 
org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1791)
        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)

14-Dec-2013 13:09:58.694 SEVERE [ajp-nio-8019-ClientPoller-0] 
org.apache.tomcat.util.net.NioEndpoint$Poller.run 
 java.lang.OutOfMemoryError: Java heap space
        at 
org.apache.tomcat.util.net.NioEndpoint.reclaimParachute(NioEndpoint.java:313)
        at 
org.apache.tomcat.util.net.NioEndpoint.checkParachute(NioEndpoint.java:298)
        at 
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1128)
        at java.lang.Thread.run(Thread.java:744)

14-Dec-2013 13:09:58.694 SEVERE [ajp-nio-8019-ClientPoller-1] 
org.apache.tomcat.util.net.NioEndpoint$Poller.run 
 java.lang.OutOfMemoryError: Java heap space
        at 
org.apache.tomcat.util.net.NioEndpoint.reclaimParachute(NioEndpoint.java:313)
        at 
org.apache.tomcat.util.net.NioEndpoint.checkParachute(NioEndpoint.java:298)
        at 
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1128)
        at java.lang.Thread.run(Thread.java:744)

14-Dec-2013 13:10:00.600 SEVERE [ajp-nio-8019-ClientPoller-0] 
org.apache.tomcat.util.net.NioEndpoint$Poller.run 
 java.lang.OutOfMemoryError: Java heap space
        at 
org.apache.tomcat.util.net.NioEndpoint.reclaimParachute(NioEndpoint.java:313)
        at 
org.apache.tomcat.util.net.NioEndpoint.checkParachute(NioEndpoint.java:298)
        at 
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1128)
        at java.lang.Thread.run(Thread.java:744)

14-Dec-2013 13:10:01.991 SEVERE [ajp-nio-8019-ClientPoller-0] 
org.apache.tomcat.util.net.NioEndpoint$Poller.run 
 java.lang.OutOfMemoryError: Java heap space

14-Dec-2013 13:10:02.257 SEVERE [ajp-nio-8019-ClientPoller-1] 
org.apache.tomcat.util.net.NioEndpoint$Poller.run 
 java.lang.OutOfMemoryError: Java heap space

14-Dec-2013 13:10:04.663 SEVERE [ajp-nio-8019-ClientPoller-0] 
org.apache.tomcat.util.net.NioEndpoint$Poller.run 
 java.lang.OutOfMemoryError: Java heap space


2)

I had an issue today morning (also with Tomcat 8.0.0-RC7) where the ISAPI 
Redirector was only serving empty responses (but with correct headers). The raw 
request/response to IIS looked like this:

Request:
GET / HTTP/1.1
Host: mydomain.de
Connection: keep-alive

Response:
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/xhtml+xml;charset=UTF-8
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Server: Microsoft-IIS/8.5
X-UA-Compatible: IE=edge
Date: Sat, 14 Dec 2013 10:43:00 GMT

0

I then made the same request directly to Tomcat's HTTP NIO connector, but there 
everything worked - the response body was received correctly.

This is my ISAPI redirector's workers.properties:
  worker.list=worker1
  worker.worker1.type=ajp13
  worker.worker1.host=localhost
  worker.worker1.port=8019

This is uriworkermap.properties:
  /*=worker1
  !/iis-dir/*=worker1

The ISAPI redirector is configured to enable chunked encoding.


I assumed this was a problem with the ISAPI redirector, but even if I stopped 
IIS (and ensured all w3wp.exe processes have exited) and restarted it, IIS 
still served an empty response. I then reconfigured Tomcat to listen on ports 
80/443 (since the only sites at IIS listening on port 80 and 443 were 
redirected to Tomcat) and restarted Tomcat, so that the websites on port 80 and 
443 were served correctly.
However, after I tried to reproduce the problem (configuring the IIS website to 
bind to port 88), I could not reproduce the problem anymore - IIS/ISAPI 
Redirector were now correctly serving the content.

I have not looked into the raw AJP packets that Tomcat sent to the ISAPI 
redirector when the issue happened, as I thought I could reproduce it later, 
which now is not the case.
Since the problem persisted when restarting IIS, but not when restarting 
Tomcat, I think this was a problem with Tomcat and not with the ISAPI 
Redirector.

Any ideas what could cause this?


Thanks.


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

Reply via email to