I have been working on this project on Java with multiple modules. Since quite some time, I have been occasionally getting “java: Out Of Memory” error! I am pretty new to this ‘popular’ error and wanted to know the general approach to solve such errors.
Also, are there standard tools accepted by the industry to help figure out the cause of such errors?
The modules in my project include every minute polling from a third party (using web service), multi-threading among other things. However, this is just a pointer and I seek a general approach and not something very specific to my project.
Thanks.
I have been working on this project on Java with multiple modules. Since quite
Share
Sometimes you just have an class that uses a lot of memory and you need to increase the heap size or make a more space-efficient algorithm. Other times it is a leak and you need to deference objects.
jvisualvm(it’s included in the JDK).out-of-memory error while keeping an eye on the heap size.
largest objects by size – often that will give you the culprit
class.