Core Java

JVM is down with “OutOfMemory” error – what should I do?

Amazing as it may seem, but this particular cry “From the Depths” is frequently displayed among the results of search requests regarding JVM settings. You have probably been faced with the “I remember that option, but how to enable it” problem, while administrating servers or adjusting virtual appliances at times (semi-annualy, for example) and apart from your main tasks. There is no wonder in it, as basic settings are easy to forget, if they are rarely used.

So, what do you do in this case? Come up on Google, of course, in hope to find the answer in a maximum of 20 minutes. This approach may help if you are trying to solve simple tasks. But when you perform delicate adjustments of the JVM, complications may appear. Sometimes you have to cut off junk information for newcomers, or even get into a muddle of terms and different approaches of resolving one and the same task, as there are loads of denominations for identical options in different sources. In the long run, a working day is over and the task is far from being resolved.

Java Developer’s Crib

Who said that only students need cribs? When we search for necessary information in the Internet, we add the most useful pages to bookmarks, which are cribs, in fact. But the only way to organize them is to create topical folders. Yet, it is impossible to filter texts.

Fortunately, a new resource has been recently created to accumulate relevant information for Java developers of any level and choose only necessary information with the help of a user interface, with everything unwanted cut off. This idea has originated with Leonid Vygovsky – the leader of the development team from St. Petersburg, Russia, p.h.d, , teaching assistant of  Saint-Petersburg State electrotechnical university LETI and the author of various publications and patents. A short interview with Leonid is presented below, with the pros of this effective project described.


Leonid, tell us about your resource.
The site is dedicated to JVM settings, to memory operation tuning, firstly, as 99% of all adjustment concerns memory. JVM in itself presents sufficiently little information about its settings. The Internet in turn provides a lot of information, which can be incorrect, as well as outdated. The site accumulates the checked settings, which will come in handy to the majority of developers. It also provides links to selected resources, which are dedicated to the JVM garbage collector.

Tell us a bit more about the garbage collector
Algorithms of garbage collection are variously named by different authors, and it involves difficulties of some kind. The site contains the unification of all existing names of collectors and their short descriptions. There are two stages of garbage collection in JVM: garbage objects of young generation at first and then of tenured generation. You are free to choose different algorithms for varied generations accordingly to particular scheme.

What was the reason for creating the site?
I have always been interested in the development of those applications, which are really useful for people. So, when I once again was searching in Google for permgen settings in java, I decided to create a small and simple utility for the adjustment of these parameters. Besides, I have always desired to search for new tools while being in charge of project development, so that these tools improve developers’ efficiency. I strongly believe, that this JavaScript-based project with AngularJS framework is a challenging idea.


What makes the site unique and convenient besides the crib-function?
JVM scarcely ever displays errors while setting up contradictory applications.  The resource in its turn allows user to do correct settings only. The site does not contain the full set of options – only the most necessary of them which helps to resolve optimization issues. Furthermore, outdated deprecated options are deleted and dangerous options are marked. The options are selected accordingly to Pareto principle – 20% of efforts results in 80% of outcome. The evaluation was based on periodicity of mentioning an option in different sources and their trustworthiness.

Were there any complexities during the deployment process?
There were no technical complexities. Yet, there were problems with different algorithm names and cutting off incorrect information, regarding settings. The realization of UI memory garbage collection scheme and defining which set of settings is more preferable for each collector were the most complicated tasks. I tried to emphasize the structure of the site. While teaching the students, I realized, that the way of handling the material is of paramount importance. The structurization and logic grouping help a great deal in digestion process. I followed the same principle here, but it was not as simple as i had expected.

In what way do you plan to develop the project?
If the project draws the attention of the community, it will be developed socially. The main points of development are adding more information and feature which enables  personal settings saving. Community feedback will certainly be taken into consideration.

Could you come up with the slogan of your project on the spot?

Check out the site!


Ilias Tsagklis

Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
hamster cage
7 years ago

Thanks for finally writing about >JVM is down with “OutOfMemory” error – whast should I do?
| Java Code Geeks – 2016 <Liked it!

Back to top button