Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

out of memory error when use the VisualVm to analysis heap dump

when use the heap dump of visualVm, there is an option to see all the instances of a specific class, but when the instances is to much, i got this error:

out of memory in heap walker: To avoid this error,increase the -Xmx value in the etc/netbeans.conf file in NetBeans IDE installation directory.

But the error should have nothing to do with the netbeans.conf, it should be something like a visualVM.conf file. And I also did not find the configuration file in my jdk. So how can i solve this error?

like image 775
Ray Avatar asked Sep 10 '25 14:09

Ray


1 Answers

There are two solutions for this :

  • 1.using command line to start the JvisualVM, e.g: jvisualvm -J-Xms1024m -J-Xmx2048m
  • 2.update the properties in %JDK_HOME%\lib\visualvm\etc\visualvm.conf

Option 1 is more convenient and recommended

like image 72
Ray Avatar answered Sep 13 '25 10:09

Ray