Blog

Solving OutOfMemoryErrors (part 7) - APM tools as a solution? Apr 30, 2012, by Nikita Salnikov-Tarnovski

Application Performance Management to the rescue?Our series of posts about solving the OutOfMemoryError in our hypothetical production system nearing the conclusion. We have covered a number of different ways to attack OutOfMemoryErrors so far - profilers, JDK bundled tools and heap dump analyzers. Our today’s mercenaries will be Application Performance Management tools, or APMs.

Read further... | Comments

Plumbr is mature: 1.0RC6 adds hot attach function Apr 28, 2012, by Priit Potter

We are writing in from Tallinn Airport, on our way to San Francisco to the YCombinator interview. And we want to announce a major user interface update of our memory leak detector tool.

This release of Plumbr is special also in another way: it is the final feature release before the official Plumbr 1.0. From this point on, we will only improve infrastructure and fix possible bugs, but will not add to the functionality any more. Plumbr 1.0 will introduce paid plans, which means that now is the last opportunity to use a feature-complete Plumbr for free. Hurry!

If you have the tool already, we strongly encourage you to upgrade. If you don't, enter your e-mail address in the box to the right - and have Plumbr running in your desktop or server in 5 minutes.

Read further... | Comments

On estimating the time it takes to solve a memory leak Apr 16, 2012, by Priit Potter

Throughout the decade of being responsible for delivering various IT projects I have involuntarily developed  a reflex - whenever I hear someone saying "Our application has a memory leak", I immediately get shivers running down my spine.

The thing is - you can never estimate the amount of time it takes to solve the leak. Moreover - if the problem is in production, it means immediately allocating the best developer(s) in the team for an impossible-to-estimate period of time, and dropping everything else they were doing.

You're a bit more in luck if the leak is not in production, but the prospect of having to face the unknowns that always accompany memory leaks (How can we reproduce it? What is leaking? Where is it leaking? How long will it take to fix the leak? How can we verify the fix?) is still not very pleasant - to say the least.

However, in the last months I've had several positive encounters with memory leaks that have resulted in the reflex starting to evade. It turns out that it is possible to find the cause of a memory leak - and also fix it!  - in half an hour.

Read further... | Comments

Solving OutOfMemoryError (part 6) - Dump is not a waste Mar 27, 2012, by Nikita Salnikov-Tarnovski

Just been dumpedLet us continue our series of posts about solving the OutOfMemoryError in our hypothetical production system.

We have described  different methods to tackle the problem, and today's post concentrates on what you can learn from heap dumps. Spoiler alert: with a bit of luck, you can get very close to solving the OOM :)

Read further... | Comments

Plumbr, blind and silent Mar 07, 2012, by Nikita Salnikov-Tarnovski

Blind and muteHere's the news for you: Java memory leaks have attitude, and you need to know your way around to successfully nail and solve them. While this blog post is written in response to people who became confused while using our product for discovering memory leaks, it should serve some food for thought for other leak hunters as well.

I got an email a couple of days ago. The author had tried Plumbr on a self-made leaking test application and, to his disappointment, instead of getting a beautiful leak report he got an OutOfMemoryError. He was not the first one sending us such comments, and from the fair amount of feedback we've gathered so far we've begun seeing some patterns in how people use Plumbr.

Read further... | Comments

Plumbr 1.0RC5 is available - doubling the number of supported environments Mar 07, 2012, by Priit Potter

When I ask our users what they think about Plumbr, most of the replies fall into 3 categories:
  1. "Love it, the installation was a snap and I found the memory leak in my app" (or "... don't have any leaks at the moment, but will continue to use Plumbr")
  2. "Nice concept, but unfortunately I couldn't get it to work, because my environment is apparently not supported"
  3. "It looked interesting and I downloaded it to play around, but haven't yet had time to use it"

We are excited to say that we've taken a huge step further of eliminating the second answer listed above. With the update today we approximately doubled the number of different environments that can benefit from Plumbr. The new version brings support for Java 5, JRockit and IBM Java Virtual Machines, and a plethora of application servers that weren't supported before. See the list below.

We encourage everyone to upgrade.

Read further... | Comments

What is a memory leak? Feb 15, 2012, by Nikita Salnikov-Tarnovski

When we talk to people about our solution for discovering memory leaks    Plumbr  we immediately get positive feedback. But when we add Java into the equation, the initial excitement is often complemented with questions: “Are there memory leaks in Java? Isn't Java a garbage-collected language?”

In this post I will explain why memory leaks are in fact a common problem for Java applications.

Read further... | Comments

A look back: our company’s first 3 months and first 1000 user registrations Feb 09, 2012, by Priit Potter

In the last days of January, the number of Plumbr users exceeded an important milestone - we now have more than 1,000 users! As we started offering Plumbr as a public beta in the beginning of November last year, we can say that „collecting“ the first 1,000 customers took us 3 months.

Let's dive into the numbers (we are big fans of factual proof!), and elaborate on:

  • What did we do to get here?
  • What have we learned from the customers and where are we planning to head with product development?
  • What are we going to do to reach 10,000? 100,000? Bazillion?

Read further... | Comments

Leak detection improvement – Plumbr 1.0RC4 is available! Feb 07, 2012, by Priit Potter

We recently celebrated crossing the magic threshold of 1000 registered users.  Around 10% of those one thousand early adopters have given us feedback in some form. There is a separate blog post in progress summarizing the first 1000, and our future plans (subscribe to our twitter feed to be notified!).

But this announcement is actually dedicated to the next step in the product maturity. Fair amount of users have reported false alarms: they say that Plumbr is too sensitive and claims objects to be leaking even if those objects occupy less than 1% of heap. We have good news for you: based on the hundreds of samples of Java application object lifecycles we have gathered, the detection algorithm has been tweaked to be more „suspicious“, ie. it now avoids most of the false alerts by collecting some more evidence before announcing the verdict.

We encourage all users to upgrade.

Read further... | Comments

Screencast: how to use Plumbr Jan 23, 2012, by Priit Potter

Is it possible to explain what Plumbr is in just a few minutes? Yes, it is!

We created a screencast that walks you through installation and usage of Plumbr – it shows you how to attach it to you Java server, what should you to to make discovery of memory leaks possible and how to interpret the Plumbr report.

For those of you too lazy to press the Play button or who want to get more background information, we added some comments also below the video. Have fun watching and if you have any additional questions, leave them in the comments!

Read further... | Comments

Solving OutOfMemoryError (part 5) - JDK Tools Jan 18, 2012, by Vladimir Šor

tool-beltIn our last blog post on the "Solving OutOfMemoryError" series we looked at profilers and concluded that profiling alone doesn't help you solve memory leaks.

Today we will talk about the command line tools that are bundled with the Oracle JDK and can be used to find memory leaks. The benefit of knowing the bundled tooling is obvious: they are available everywhere where Oracle's Java is installed, i.e. often also in these test and production environments where other fancy tools are either not installed.

Read further... | Comments

Solving OutOfMemoryError (part 4) - memory profilers Dec 19, 2011, by Nikita Salnikov-Tarnovski

puzzleIt is about time to continue our Solving OutOfMemoryError blog post series. In retrospect, so far we have covered: Part 1 described the Story of solving an OutOfMemoryError through the eyes of a Developer, Part 2 explained how the Ops usually tackle the OutOfMemoryError problem, and Part 3  started looking at where to start solving the OutOfMemoryError. A couple of next posts will now look at the existing tools that you can use to find a Java memory leak.

Our past experience, which is supported by a quick search on Google and Stackoverflow, shows that the first set of tools people tend to jump to when solving memory problems in production is memory profilers. Among them, VisualVM, YourKit and JProbe seem to be the most popular.

Let's use our leaking Pet Clinic sample application as our "dying patient" and, using these three tools, try to find out why it crashes with OutOfMemoryError.

Read further... | Comments

How much should our product cost? Dec 13, 2011, by Vladimir Šor

Until now we've been focusing on developing the software – we believe that a company without a superb solution is worth nothing. However, as we also have mortgages to pay, there rose the question of our product’s revenue stream. And hence the problem – what would be the revenue model of Plumbr and how much should it cost?

Any product’s price should reflect its perceived value and be competitive. Plumbr is no different here, and its price should be related to the severity of problems it solves or helps avoid. Let’s discuss the value of the product and possible licensing models in more detail, so that we could ask in the end – how much should we charge for our product?

Read further... | Comments

A new release is available - upgrade to 1.0RC3! Dec 07, 2011, by Vladimir Šor

We are happy to announce Plumbr 1.0RC3 - a new release that greatly improves speed and leak detection accuracy, includes a demo application for fast demoing of Plumbr and fixes some smaller bugs.  We are a big step closer to finally releasing the first official Plumbr 1.0, and perhaps also removing the BETA tag from our logo :)

We encourage all users to upgrade, to benefit from a faster and more accurate leak detection and reporting.

Read further... | Comments

What does it cost to start a company? Dec 06, 2011, by Vladimir Šor

Everyone and your mom is speaking about how easy and cheap it is to launch a company in 2011. We fell into that trap and launched one. This article describes our experience in the field - was it easy and/or was it cheap? Read on to find out - in the following 1600 words or so we will describe more or less chronologically the steps we took and how much these cost.

We develop software, so the first thing we needed was a source code repository. After hesitating for 20 minutes we had a Bitbucket account set up and a Mercurial repository created. Cost - $0.00. Nice start!

For the first month it was actually all we needed, besides a whiteboard and a lot of coffee. Sleepless nights of pure hacking and nobody to disturb you - great!

Read further... | Comments

Let them talk Dec 02, 2011, by Nikita Salnikov-Tarnovski

On our quest to solve every memory leak in the Java world we get in touch with many teams who struggle with performance issues of their applications. Every developer tries to solve these differently. Some begin with vmstat or top, others with a CPU profiler or a DB load monitoring tool. Many of them turn to different APM products, like  CA APM, AppDynamics, dynaTrace, etc.

However, if you properly ask the application, it will normally give you all the information you need for performance tuning. And you can get the info without relying on indirect metrics of the operating system or the JVM.

Read further... | Comments

Announcing bugfix release 1.0RC2 Nov 11, 2011, by Vladimir Šor

First of all a big thanks to everyone who rushed in over the last days - the first public version of Plumbr turned out to be extremely popular! Thanks for keeping us up the days and nights, collecting feedback and improving the product.


And the result is here - we just released Plumbr 1.0RC2. It slightly improves leak detection and the leak report, and fixes the bugs that have been discovered - and is a step closer to a generally approved 1.0! We encourage everyone to upgrade.

Read further... | Comments

Put your fat Collections on a diet! Oct 26, 2011, by Nikita Salnikov-Tarnovski

put your Collections on a dietJava Collection API is one of the most used APIs in the Java world. It provides a convenient and pretty solid way to implement and use some every-day data structures. But are they suitable and efficient in all situations?

In this article I will investigate one case from our own experience where Java Collection API turned out to be a huge waste of memory in a pretty trivial usage scenario. 

Read further... | Comments

Public beta is now released. Welcome aboard! Oct 19, 2011, by Vladimir Šor

come in!Starting from today, the memory leak detector Plumbr is available to everyone as a public beta. This release marks a major milestone for us. After months of development we can now proudly present the first public release!

This means that:
  • The leak detection algorithm works - we have discovered more than 20 leaks in our private beta customers' projects
  • We are confident that Plumbr doesn't crash your application and doesn't create any noticeable overhead
  • We have verified that Plumbr works with JDK 6 and 7 versions on different vendors (Hotspot, jRockit)
  • Plumbr is available for everyone with a 45-day free evaluation licence

Read further... | Comments

Solving OutOfMemoryError (part 3) - where do you start? Sep 13, 2011, by Nikita Salnikov-Tarnovski

Cannot decide where to startHow do I know that the application is actually suffering from memory leaks? Where and how can I find the cause of the possible memory leak? An experienced developer usually begins its troubleshooting by answering the aforementiond fundamental questions.

Lets see a typical flow when trying to answer those two simple questions.
  1. First - you should find evidence hidden somewhere in the logs. If you are lucky you can have a peek at production logs. In most cases there is a pack of angry Kerberos - like guys guarding the access - both from operations and security units of the corporation.
  2. Lets assume that you can bypass the walls separating you from the vital information. Is it anyhow helpful? Most likely not. You find your good'ol friend Exception in thread "main" java.lang.OutOfMemoryError: while grepping through logs, but nothing interesting seems to precede its creation. There might be hints from monitoring logs that performance degradation started minutes before the actual error. But besides this - business as usual.

Read further... | Comments

Solving OutOfMemoryError (part 2)- why didn’t operations solve it? Sep 05, 2011, by Nikita Salnikov-Tarnovski

Developers and operationsYou are a developer. You should not be solving problems occurring in production once in a blue moon. But here you are again, trying to figure out what has gone wrong again. Why are you here and what could be done differently to avoid you solving these problems?

After all - your operations is also full of competent people. They have tried their best to pinpoint the root cause, by pulling different tricks from their book of knowledge. What we have faced is that the methods used might not always be the most beneficial:

  • randomly changing (read: increasing) various memory parameters, such as -Xmx, -XX:MaxPermSize and -XX:NewRatio=2;
  • logging all kind of information by creating gigabytes of logs by -verbose:gc -XX:+PrintGCTimeStamp -XX:+PrintGCDetails and so forth;
  • adding more (physical) memory to the servers;
  • … doing various other weird things that go beyond imagination.

Read further... | Comments

Solving OutOfMemoryError (part 1) - story of a developer Aug 29, 2011, by Nikita Salnikov-Tarnovski

Server crashAnother day in the office. Except that you get another call from the operations saying they now have to restart your production application every three hours. And they seem to be somewhat annoyed with this. You have a feeling that their emotion is in correlation to the number of phone calls customer support is getting lately - which has skyrocketed in the past few weeks.

I'm sure you have been there. And I am also sure you wish you would never have to be there again.

All you have is a symptom: an OutOfMemoryError. You have no clue what causes it. You cannot reproduce the problem. You cannot see the log files in production. But you have to solve it. Not that you have the task in your job contract - you are just a developer - the reasons are rather related to your engineering pride and being a responsible human being.

And here we go again. Sleepless nights or weeks. Struggling with authorization issues and bureaucracy. Getting ignorant people find the correct data for you. Great. Just great. Having the boss breathe down on your neck does not help much either. “When will it be fixed?” I bet you'd rather estimate when the P versus NP problem will be solved.

Read further... | Comments

Subscribe to blog RSS