

New (revolutionary?) solution for Java memory leak discovery: Plumbr explained - codegen
http://www.plumbr.eu/blog/screencast-how-to-use-plumbr

======
Scotchy
Everytime I open a report, it hits <http://app.plumbr.eu/decrypt_report> with
an encrypted version of the report.

Even if you don't store that information, and even if it is not really useful,
you should maybe note somewhere that all the "leak" information is sent to
Plumbr servers.

~~~
priitp
RTFM ;)

The info is sent when you click the Decrypt button, and there is an
explanation right above the button: "You are running Plumbr with evaluation
license, which means that all Plumbr reports need to be submitted to our
server to see full details. /---/"

~~~
Scotchy
True that, sorry for being blind.

Nonetheless, people upvoting my comment probably shows that many people missed
that.

------
antonyh
Neat idea, but not working for me. I tried with with Day CQ5 CMS, and Plumbr
starts but it looks like it stops while loading the Lucene indices.

This would have been useful 9 months ago when we were tracking an object leak.
Stress tests with AB and monitoring with jconsole combined with reading the
code were sufficient to find the problem.

I advise caution, particularly with false-positives (objects with long
lifecycles). If it was so easy to find the leaks, the GC would be able to
resolve the leak itself.

------
extension
I suppose this only detects intermittent leaks? If a particular class _always_
leaks then this tool would have no frame of reference to detect it, right?

------
obtu
Plumbr uses heuristics but no feedback from the user, thus it can't learn:
this will give bogus results beyond some project complexity threshold.

~~~
priitp
You are so right, this is indeed what Plumbr lacks at the moment. There are a
few possibilities to teach Plumbr already now hacked in, but these are not
advertised and we are testing them with users who have had a bigger need for
them.

As soon as we learn the best ways to offer this, the "feature" will be packed
and released.

------
nvarsj
This looked pretty neat, but the demo is useless to me - I can't send
proprietary data (whatever plumbr captures from my app) to an external server.

So without any way to evaluate the product, I'll be moving on.

------
DanielRibeiro
Really nice. I've used Yourkit profiler quite a few times to solve java memory
leaks, but this automated detection seems awesome. Thanks for sharing.

~~~
white_devil
How and how often do Java memory leaks actually happen? It's never stricken me
as a problem. I guess some kind of global variables are involved.

~~~
mvanga
You might, for example, insert an entry into a hashtable and forget to remove
it. The garbage collector can't go and clean it up because it can't know
whether you plan to use it or not. This way, over time, the memory usage keeps
growing.

~~~
riffraff
also, as grandparent guessed, static and thread local variables do not have
the same lifecycle of the "normal" objects, I've been bitten more than once by
some "clever" optimization caching stuff in those places.

------
kinow
Neat :)

------
Ubersoldat
Detecting memory leaks is easy: run some stress tests before deploying to
production! I mean, I don't see the use of this tool. Attach it to a live JVM
to detect leaks which shouldn't be there?

~~~
ivoivo
It tends to be more complex than this for several reasons:

a) you usually cannot simulate the exact behavior of users in production
environment. Users tend to be quite creative in ways they approach your
workflows and your artificial tests might not catch it b) Your
dev/test/staging environment is usually not a 100% replica of the production
site - you might lack access to some integrated systems, have different
datasets for confidentiality reasons, use virtualized machines instead of
physical, etc c) Or anything else which all leads to the sad fact that
oftentimes you just cannot replicate the leak in any other env than
production.

~~~
Ubersoldat
Totally agree and this tool might help in this situations but still I find it
more suitable to simply watch the memory usage, which in a sane application,
should have a pattern.

------
gumbo
Not so revolutionary to me. Won't use such a tool. Smart programming/peer
reviewing is the way to go.

~~~
gumbo
Can you explain the downvote.... what the hell, i know i could have been
commented better, but this is not a reason to downvote.

