5 Replies Latest reply: Jun 8, 2010 2:37 AM by PhHein RSS

    visual vm oom error - increase -Xmx in netbeans.conf?

    843798
      I am using visualvm to help diagnose a possible memory leak (in a Tomcat 5.5 webapp). I am able to start memory profiling in visual vm and able to take an initial profiler snapshot of Tomcat after its initial startup. I then run a few things in the webapp that I suspect are related to the possible memory leak and see that my average memory heap size is gradually increasing. I attempt to take another profiler snapshot and end up with this error.

      [error screenshot|http://i34.tinypic.com/28heonp.png]

      Mainly it looks like I want
      netbeans_default_options="-J-Xmx1024m"
      Tried putting that directly in ${visualvm}/etc/visualvm.conf . Didn't work.

      I extracted the sample netbeans.conf from [http://wiki.netbeans.org/FaqNetbeansConf] .

      I have tried putting that netbeans.conf file in the following locations:
      -${visualvm}/etc/netbeans.conf
      -${visualvm}/platform9/etc/netbeans.conf
      -${userhome}/.netbeans/etc/netbeans.conf
      -${userhome}/.nbprofiler/etc/netbeans.conf

      I have no netbeans IDE installation, so of course it doesn't make sense to follow suggestions in that faq to the letter.

      I should note that I have already added -J-Xmx1536m to my visualvm.conf's default_options . visualvm doesn't yet come anywhere near that limit.

      Is there somewhere/some way to configure this netbeans Xmx value for visualvm?
        • 1. Re: visual vm oom error - increase -Xmx in netbeans.conf?
          843798
          dirkraft wrote:
          I am using visualvm to help diagnose a possible memory leak (in a Tomcat 5.5 webapp). I am able to start memory profiling in visual vm and able to take an initial profiler snapshot of Tomcat after its initial startup. I then run a few things in the webapp that I suspect are related to the possible memory leak and see that my average memory heap size is gradually increasing. I attempt to take another profiler snapshot and end up with this error.

          [error screenshot|http://i34.tinypic.com/28heonp.png]

          Mainly it looks like I want
          netbeans_default_options="-J-Xmx1024m"
          You should modify default_options property in $[visualvm}/etc/visualvm.conf instead.
          >
          Tried putting that directly in ${visualvm}/etc/visualvm.conf . Didn't work.

          I extracted the sample netbeans.conf from [http://wiki.netbeans.org/FaqNetbeansConf] .

          I have tried putting that netbeans.conf file in the following locations:
          -${visualvm}/etc/netbeans.conf
          -${visualvm}/platform9/etc/netbeans.conf
          -${userhome}/.netbeans/etc/netbeans.conf
          -${userhome}/.nbprofiler/etc/netbeans.conf

          I have no netbeans IDE installation, so of course it doesn't make sense to follow suggestions in that faq to the letter.

          I should note that I have already added -J-Xmx1536m to my visualvm.conf's default_options . visualvm doesn't yet come anywhere near that limit.

          Is there somewhere/some way to configure this netbeans Xmx value for visualvm?
          Cheers,

          JB
          • 2. Re: visual vm oom error - increase -Xmx in netbeans.conf?
            843798
            You should modify default_options property in $[visualvm}/etc/visualvm.conf instead.
            I should note that I have already added -J-Xmx1536m to my visualvm.conf's default_options . visualvm doesn't yet come anywhere near that limit.
            I already have that increased. It does not seem to carryover to the profile snapshot.

            Is the switch called something else?
            • 3. Re: visual vm oom error - increase -Xmx in netbeans.conf?
              843798
              Hello.

              I know this is a very old thread but maybe somebody is looking for the answer, like me, and finds it (it's first in google results).

              So, I've found that on Windows, if you want to increase the memory for the Visual VM tool, you must can do it from in the file
              %JDK_HOME%\lib\visualvm\etc\visualvm.conf
              changing the default_options property
              I've put this for me

              default_options="-J-Xms128m -J-Xmx784m -J-Dsun.jvmstat.perdata.syncWaitMs=10000"

              Have fun,
              Edward Moraru.

              P.S. : I have a jdk 1.06.0_16 installation
              • 5. Re: visual vm oom error - increase -Xmx in netbeans.conf?
                PhHein
                Ok, I'm locking this zombie now.