Plumbr 1.1 – we now find PermGen leaks

July 10, 2012 by Nikita Salnikov-Tarnovski

It’s been only a month since we released 1.0. But we already have something new and cool to ship – as of this version we also find the leaks in the JVM permanent generation.

PermGen leaks are a specific type of a memory leak often occuring during the redeploy phase.

I guess you all have faced the dreaded java.lang.OutOfMemoryError: PermGen space  at some point during your career. And I bet most of you have struggled to find the cause and fix for this. Worry no more – Plumbr now provides you the tools needed to find and fix those errors.

Receiving a java.lang.OutOfMemoryError: PermGen space signals that you have a Permanent Generation leak in your application. Which in turn means that whenever you redeploy the application in your application server, it leaves a lot of classes behind. Those old class definitions end up in your JVM permanent generation eating up precious memory. In our experience – a typical PremGen leak is quite large – anywhere between 2MB and 20MB. Considering that in most JVMs the default size of PermGen is less than 100MB it might take only a few redeploys before permanent generation runs out and server crashes.

Why is it important to fix it? It is a memory leak. Eating away your precious memory you could put into better use. In development and/or test environments it just means you have to restart your application servers every once in awhile. So in those environments its  your time you are spending waiting on another redeploy. And I bet you have better things to do with your time. Like reading this article for example.

In production systems things look a lot worse - you’ll need to account for the risk that every redeploy could literally kill your production application. So you are forced to do full JVM restarts with every new release instead of the redeploys. This takes more time and your end-users could face lost sessions and/or service outages. Also – the production systems tend to run on quite an expensive infrastructure, so it might not be financially reasonable to spend a large amount of the precious memory referencing to garbage.

In addition to the permgen leak discovery, we also improved Plumbr by:

  • fixing several issues related to hot attach UI. It will now be easier to add Plumbr to the running Java processes;
  • improving notification system – when Plumbr finds a leak you will now be alterted via e-mail;
  • displaying long stacktraces in the leak report a more compact and readable form;
  • fixing some bugs causing NullPointerExceptions during race conditions;

If you are facing leaks and cannot resolve them – go ahead, register and download Plumbr. If you are running an older version of Plumbr, we strongly recommend to download an upgrade.

Can't figure out what causes your OutOfMemoryError? Read more

ADD COMMENT

COMMENTS

I run PLUMBR for program where memory leak exist , my tomcat can’t be
up, due to perm out of memory . Nothing has been find here.

Boris

Boris Fain

Can't figure out what causes your OutOfMemoryError? Read more

Latest
Recommended
You cannot predict the way you die
When debugging a situation where systems are failing due to the lack of resources, you can no longer count on anything. Seemingly unrelated changes can trigger completely different messages and control flows within the JVM. Read more
Tuning GC - it does not have to be that hard
Solving GC pauses is a complex task. If you do not believe our words, check out the recent LinkedIn experience in garbage collection optimization. It is a complex and tedious task, so we are glad to report we have a whole lot simpler solution in mind Read more
Building a nirvana
We have invested a lot into our continuous integration / delivery infrastructure. As of now we can say that the Jenkins-orchestrated gang consisting of Ansible, Vagrant, Gradle, LiveRebel and TestNG is something an engineer can call a nirvana. Read more
Creative way to handle OutOfMemoryError
Wish to spend a day troubleshooting? Or make enemies among sysops? Registering pkill java to OutOfMemoryError events is one darn good way to achieve those goals. Read more