Hi Mark,

> > If you set the following system property:
> > org.apache.catalina.connector.RECYCLE_FACADES
> >
> > to true (e.g. in setenv.[bat|sh]) and your application is retaining
> > references you should start to see NPEs and the stack trace should
> point
> > to where the problem is.
> >
> > If you still see BufferOverflowException with that setting in place
> then
> > that would make a Tomcat bug more likely.

Since I also got BufferOverflowExceptions with AJP-NIO, I tried your
suggestion setting the system property
"org.apache.catalina.connector.RECYCLE_FACADES" to "true" (by setting it in
the Java options using tomcat7w.exe) and switched from AJP-BIO to the
AJP-NIO connector.

Today, I got a BufferOverflowException again, this time using the following
environment:
Windows Server 2008 R2 SP1 x64,
Java 1.7.0_10 (64 bit),
Tomcat 7.0.35,
Frontend: IIS 7.5 with ISAPI Redirector 1.2.37


In the logfile, the following stacktrace was written:

Jan 18, 2013 2:43:21 PM org.apache.coyote.ajp.AjpNioProcessor process
SEVERE: Error processing request
java.nio.BufferOverflowException
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:183)
        at
org.apache.coyote.ajp.AjpNioProcessor.output(AjpNioProcessor.java:281)
        at
org.apache.coyote.ajp.AbstractAjpProcessor$SocketOutputBuffer.doWrite(Abstra
ctAjpProcessor.java:1124)
        at org.apache.coyote.Response.doWrite(Response.java:505)
        at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:
383)
        at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
        at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:334)
        at
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:283)
        at
org.apache.catalina.connector.Response.finishResponse(Response.java:513)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:434)
        at
org.apache.coyote.ajp.AjpNioProcessor.process(AjpNioProcessor.java:184)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:589)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:
1680)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
10)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
03)
        at java.lang.Thread.run(Thread.java:722)

The log of the isapi-redirector contains for the given time (but not only)
an error:
[Fri Jan 18 14:43:21.904 2013] [5040:1780] [error]
isapi_write_client::jk_isapi_plugin.c (1286): WriteClient failed with 995
(0x000003e3)

The isapi log contains about 43 such errors ("WriteClient failed with 995")
per hour, which probably means that in such a case, the ISAPI redirector
closes the AJP connection before the full response has been sent.


I'm not sure how many requests my Tomcat does process, but I would guess
about 50-100 requests per second. The BufferOverflowExceptions seems to
occur rarely, it took ~ 12 hours after switching to the NIO connector for
the exception to occur.


Do you have any ideas?


Thanks,

Konstantin Preißer


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

Reply via email to