Hi,
I had the EXACT same thing happen.  A temporary solution, applied in
4.1.14-LE, was to increase the buffer size to 48K.  But I've yet to test
this, and I suspect it's not the perfect solution.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Neil Milne [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, November 21, 2002 9:14 AM
>To: [EMAIL PROTECTED]
>Subject: Tomcat 4.1.12 ArrayIndexOutOfBoundsException in
>InternalOutputBuffer.write()
>
>Hi
>I'm seeing an occasional ArrayIndexOutOfBoundsException in the
>org.apache.coyote.http11.InternalOutputBuffer write method. It appears
>that the buffer holding the response headers (which has a default size
>of 32000 bytes) is occasionally overflowing. I can't reliably repeat
>this so I'm not sure under what circumstances it occurs - I have to
>hammer the site for a while to get it to repeat!
>I added some logging to the code to see what the buf byte array had in
>it just as it was about to overflow and it appears to have multiple
>responses of the form:
>
>HTTP/1.1 200 OK
>Content-Type: text/html;charset=ISO-8859-1
>Cache-Control: no-cache, post-check=0, pre-check=0
>Pragma: no-cache
>Expires: Thu, 01 Dec 1994 16:00:00 GMT
>Transfer-Encoding: chunked
>Date: Thu, 21 Nov 2002 12:02:39 GMT
>Server: Apache Coyote/1.0
>Transfer-Encoding: chunked
>Date: Thu, 21 Nov 2002 12:02:39 GMT
>Server: Apache Coyote/1.0
>Transfer-Encoding: chunked
>Date: Thu, 21 Nov 2002 12:02:39 GMT
>Server: Apache Coyote/1.0
>Transfer-Encoding: chunked
>Date: Thu, 21 Nov 2002 12:02:39 GMT
>Server: Apache Coyote/1.0
>
>with an arbitrary number of repeats of the last three lines.
>
>I'm not sure why the buffer would have more than one response in it,
and
>I'm not sure why the transfer encoding, date and server lines are
>repeated so often. Any ideas? Since I've only just started looking at
>the source I'm not really familiar enough with the flow of the code to
>know if this is expected behaviour.
>
>I guess a short term fix would be to resize buf as required rather than
>just assuming it has the capacity, but it would be nice to know why so
>much stuff ends up in the array sometimes!
>
>Any ideas?
>Neil
>
>--
>Neil Milne                             Hippo IT Consultants Ltd
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to