Re: maxHttpHeaderSize: InternalNioInputBuffer vs InternalNioOutputBuffer
Just to confirm, it is a bug in the InputBuffer, not OutputBuffer? Yuesong On Jan 21, 2011, at 6:12 AM, Mark Thomas wrote: On 21/01/2011 00:53, Yuesong Wang wrote: Hi, Is there a reason why InternalNioInputBuffer automatically grows its buffer, effectively ignoring the maxHttpHeaderSize setting, while InternalNioOutputBuffer doesn't? I was playing around with the setting, and set it to a rather small value. While large requests seem to go through without an issue due to the automatic expansion of the buffer, the response will choke if it's over the maxHttpHeaderSize limit and an ArrayIndexOutOfBoundsException will be thrown. This lack of response size check/proper error handling in InternalNioOutputBuffer also leads me to believe that it may not be by design? Looks like a bug in InternalNioInputBuffer to me. Please create a bugzilla entry. Cheers, Mark This is tomcat 6.0.29 + NIO connector. Thanks, Yuesong - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: maxHttpHeaderSize: InternalNioInputBuffer vs InternalNioOutputBuffer
So the bug is InternalNioInputBuffer not honoring maxHttpHeaderSize? Yuesong On Jan 21, 2011, at 9:33 AM, Mark Thomas wrote: On 21/01/2011 13:55, Yuesong Wang wrote: Just to confirm, it is a bug in the InputBuffer, not OutputBuffer? InputBuffer, yes. OutputBuffer not so sure. As a minimum, it should be consistent with the other connectors. I haven't checked how they behave. Mark Yuesong On Jan 21, 2011, at 6:12 AM, Mark Thomas wrote: On 21/01/2011 00:53, Yuesong Wang wrote: Hi, Is there a reason why InternalNioInputBuffer automatically grows its buffer, effectively ignoring the maxHttpHeaderSize setting, while InternalNioOutputBuffer doesn't? I was playing around with the setting, and set it to a rather small value. While large requests seem to go through without an issue due to the automatic expansion of the buffer, the response will choke if it's over the maxHttpHeaderSize limit and an ArrayIndexOutOfBoundsException will be thrown. This lack of response size check/proper error handling in InternalNioOutputBuffer also leads me to believe that it may not be by design? Looks like a bug in InternalNioInputBuffer to me. Please create a bugzilla entry. Cheers, Mark This is tomcat 6.0.29 + NIO connector. Thanks, Yuesong - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: maxHttpHeaderSize: InternalNioInputBuffer vs InternalNioOutputBuffer
Done: https://issues.apache.org/bugzilla/show_bug.cgi?id=50631 Thanks, Yuesong On Jan 21, 2011, at 9:33 AM, Mark Thomas wrote: On 21/01/2011 13:55, Yuesong Wang wrote: Just to confirm, it is a bug in the InputBuffer, not OutputBuffer? InputBuffer, yes. OutputBuffer not so sure. As a minimum, it should be consistent with the other connectors. I haven't checked how they behave. Mark Yuesong On Jan 21, 2011, at 6:12 AM, Mark Thomas wrote: On 21/01/2011 00:53, Yuesong Wang wrote: Hi, Is there a reason why InternalNioInputBuffer automatically grows its buffer, effectively ignoring the maxHttpHeaderSize setting, while InternalNioOutputBuffer doesn't? I was playing around with the setting, and set it to a rather small value. While large requests seem to go through without an issue due to the automatic expansion of the buffer, the response will choke if it's over the maxHttpHeaderSize limit and an ArrayIndexOutOfBoundsException will be thrown. This lack of response size check/proper error handling in InternalNioOutputBuffer also leads me to believe that it may not be by design? Looks like a bug in InternalNioInputBuffer to me. Please create a bugzilla entry. Cheers, Mark This is tomcat 6.0.29 + NIO connector. Thanks, Yuesong - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Request Line Truncated and Caused 501
Thanks. I tried 6.0.30, but under heavy load in our production environment, its memory usage shot up in a matter of minutes and we had to bring it down. We did not see that in 6.0.29. Yuesong On Jan 19, 2011, at 5:59 PM, Mark Thomas wrote: On 19/01/2011 19:54, Yuesong Wang wrote: Hi, I have tomcat 6.0.29 configured using the NIO connector running on linux. My access log shows strange 501 errors like this: Known issue. Fixed in 6.0.30. http://issues.apache.org/bugzilla/show_bug.cgi?id=50072 Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Request Line Truncated and Caused 501
Thanks. I think Mark identified the memory problem in 6.0.30. So we will try again when a new release is available with the fix. For now we've reverted to 6.0.20 which seems to be free of both defects. Yuesong On Jan 20, 2011, at 11:38 AM, Jason Pyeron wrote: -Original Message- From: Yuesong Wang Sent: Thursday, January 20, 2011 10:41 To: Tomcat Users List Subject: Re: Request Line Truncated and Caused 501 Thanks. I tried 6.0.30, but under heavy load in our production environment, its memory usage shot up in a matter of minutes and we had to bring it down. We did not see that in 6.0.29. The patch should easily back port. On Jan 19, 2011, at 5:59 PM, Mark Thomas wrote: snip/ Known issue. Fixed in 6.0.30. http://issues.apache.org/bugzilla/show_bug.cgi?id=50072 -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
maxHttpHeaderSize: InternalNioInputBuffer vs InternalNioOutputBuffer
Hi, Is there a reason why InternalNioInputBuffer automatically grows its buffer, effectively ignoring the maxHttpHeaderSize setting, while InternalNioOutputBuffer doesn't? I was playing around with the setting, and set it to a rather small value. While large requests seem to go through without an issue due to the automatic expansion of the buffer, the response will choke if it's over the maxHttpHeaderSize limit and an ArrayIndexOutOfBoundsException will be thrown. This lack of response size check/proper error handling in InternalNioOutputBuffer also leads me to believe that it may not be by design? This is tomcat 6.0.29 + NIO connector. Thanks, Yuesong - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Request Line Truncated and Caused 501
Hi, I have tomcat 6.0.29 configured using the NIO connector running on linux. My access log shows strange 501 errors like this: 86.24.156.114 - - [19/Jan/2011:14:41:28 -0500] eferer: /static/r07/sh30.html 501 1235 - - 41.203.64.251 - - [19/Jan/2011:14:39:18 -0500] ET actual url HTTP/1.1 501 1220 actual referrer Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CPNTDF; .NET4.0C) It seems something went wrong while reading the request, and a rather random chunk is treated as the request uri. I thought it had to do with the maxHttpHeaderSize being too small, and tried to reproduce it but couldn't. I suspect the http request itself is malformed, but can't be sure because I can't get to the raw request (RequestDumperValve happens after the raw request is parsed I think). Any idea what the problem may be or how to go about investigating this? Thanks, Yuesong - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org