Glenn Holmer wrote:
> On Wed, 2008-11-05 at 10:10 -0500, Ryan de Laplante wrote:
>
>> Twice we've encountered out of heap space errors lately. This time I
>> remembered to try and use tools like visual vm to diagnose. I opened
>> Visual VM and it only showed the Java process of Visual VM itself, not
>> the java process running GlassFish. I tried the remote feature but that
>> didn't help.
>>
>
> Did you try connecting via JMX? The output from GlassFish on startup
> should contain a line something like this:
>
> Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
> [service:jmx:rmi:///jndi/rmi://hostname:8686/jmxrmi] for domain
> management purposes.
>
> So in VisualVM, you can right-click Local or either a remote host (after
> clicking Remote and adding it) and select "Add JMX Connection" using the
> part in brackets.
>
Thanks, that helped. I wasn't able to do it when our app was out of
memory but I'll know for next time. For now I get to examine a massive
heap dump :D
Thanks,
Ryan