users@grizzly.java.net

Re: Quickest way to kill a connection

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 29 Nov 2007 10:09:34 -0500

Alan Williamson wrote:
> Jeanfrancois Arcand wrote:
>> Salut,
>>
>> OK I've fixed the isssue. Mainly, the time was always multiplied by 2
>> (I know I did that because of a jdk 1.4 issue, but don't recall why
>> exactly ;-)). Anyway I've removed the * 2 and now setting the timeout
>> to 1 produce:
>>
>>> [ja120114_at_localhost grizzly]$ telnet localhost 8080
>>> Trying 127.0.0.1...
>>> Connected to localhost.
>>> Escape character is '^]'.
>>> a
>>> a
>>> Connection closed by foreign host.
>>
>> Let me know if that still doesn't work. The new binary have been
>> uploaded as well.
>
> Morning.
>
> Tried the new JAR from:
> http://download.java.net/maven/2/com/sun/grizzly/http/1.6-SNAPSHOT/
>
> and if it only seems to work if i set the following:
>
> ByteBufferInputStream.setDefaultReadTimeout( 5 );
>
> but you indicated to me earlier that this is milliseconds and not
> seconds. So am not sure what is going on.
>
> ByteBufferInputStream.setDefaultReadTimeout( 5000 );
>
> if i set this, then i can push characters to telnet quite happily.

Just to make sure I get it correctly, can you tell me what you are doing
exactly? Is the bytes a well formed request or just junk? Setting it to
5 is quite low and will break normal request processing under load in
case the OS buffers are full.

Thanks!

-- Jeanfrancois



>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>