users@grizzly.java.net

Re: glassfish v3 throttling

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 28 Oct 2009 09:42:19 -0400

Salut,

Cam Bazz wrote:
> Hello Jean Francois,
>
> I am using GlassFish v3 (build 47.4)
>
> I also made the unfortunate mistake of using this in production server.... :)

Can you update to a b68 to see if that still happens? Was it happening
before?

>
> Unfortunately, there is nothing in server log. It just says
> out-of-memory error, then the server goes blind.
>
> However, I do have a heap dump that I got with jmap, and now I am
> trying to open it with jmap, but it is a 4gb heap dump, and i have 8gb
> of mem in my box, and 8gb is not enough. I specified -mx12G and of
> course it is running for 3 days now, but did not start the jhat server
> yet. but still waiting.

If you can share the heap dump (or open port 7000) I'm sure I can help
with this.

Thanks


-- Jeanfrancois


>
> I will read the api documents, and rewrite a mail later on.
>
> Best Regards,
> -C.A.
>
>> Oh! Can you share the server.log? The Interceptor API is defined here:
>>
>> * http://is.gd/4Euml
>>
>> Mainly, this APi gets called after the request headers has been parsed. That
>> might be too late for you so that's why I would like to see some stack trace
>> I can help. It might be better to close connection as soon as you accept
>> them. In that case, you would like to extends the TCPSelectorHandler:
>>
>> * http://is.gd/4EuBO
>>
>> Specifically the onAccept method
>>
>> * http://is.gd/4EuDV
>>
>> Now if we go that route I will need to do some work to allow you to
>> configure GF to use your TCPSelectorHandler. That's simple to do.
>>
>> A+
>>
>> --Jeanfrancois
>>
>>
>>> Best.
>>>
>>>
>>>
>>> On Tue, Oct 27, 2009 at 11:47 AM, Oleksiy Stashok
>>> <Oleksiy.Stashok_at_sun.com> wrote:
>>>> Hi,
>>>>
>>>>> How can I throttle requests per ip, say, max 10 requests per ip, or
>>>>> rather ip/useragent when I am using glassfish v3? I though grizzly had
>>>>> some built in mechanisms for that, but I could not figure out how to
>>>>> do it.
>>>> AFAIK we don't have such a mechanism. You can add it by implementing
>>>> custom
>>>> HTTP com.sun.grizzly.util.Interceptor.
>>>>
>>>> WBR,
>>>> Alexey.
>>>>
>>>>> Best.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>