users@glassfish.java.net

Re: Latest version of Grizzly for

From: Ed Hillmann <ed.hillmann_at_gmail.com>
Date: Fri, 18 Mar 2011 08:10:40 +1000

Hi Trix. Alexey is correct. But default, Glassfish 2.1.1 doesn't enable
comet/grizzly. It is enabled like this in your domain.xml

        <http-listener acceptor-threads="8" address="0.0.0.0"
blocking-enabled="false" default-virtual-server="server" enabled="true"
family="inet" id="http-listener-1" port="16125" security-enabled="false"
server-name="" xpowered-by="true">
          <property name="cometSupport" value="true"/>
        </http-listener>

Specifically, the "cometSupport" property set to true. If you don't have
this entry in your domain.xml file, then you're not using comet / grizzly.

While my server never crashed, the latencies grew and grew as the heap
filled up and the garbage collectors kept running more frequently with
little results (due to references not cleaned up).

If your memory is not going down after all the sessions are closed (remember
to wait until any sessions are timed out and invalidated), I'd do a heap
dump and see what's holding on to all the memory. That was the first step
for us in determining what was causing this.

There are a variety of ways to do this, and tools. Originally, we used jmap
to write the heap dump, and use VisualVM to read the heap dump. VisualVM
can also generate a heap dump as well. But there are lots of tools to do
this, this is not an endorsement... it's the first approach we used and it
was good enough for us. This blog
entry<http://rejeev.blogspot.com/2009/04/analyzing-memory-leak-in-java.html>was
helpful for us to understand the mechanics of analysing a heap map.

Hope this helps,
Ed

On Thu, Mar 17, 2011 at 9:30 PM, <forums_at_java.net> wrote:

> Hi Ed!
>
> I need your help .
>
> I have same problem so can you help me how to disable comet from the http
> service?
>
> I can't resolve memory heap why and how ,and i put new version 1.0.39 in
> path but witout success.
>
> Also my processors are over 140% ,i try everything but can't find
> soluction.My server crash every few days
>
> Tnx
>
>
> --
>
> [Message sent by forum member 'boske3']
>
> View Post: http://forums.java.net/node/781371
>
>
>