Remote identification of memory leak in the application used by the client

The client complains that it experiences a memory leak in our Java application.

Despite all my efforts to reproduce its surroundings, configuration, and use, I could not reproduce and thus identify the leak.

I would like to go a different way ... Instead of trying to reproduce it, perhaps I could ask him to create some idea of ​​his heap that would allow me to identify the leak.

Being a managed client who will send it to me, there are some requirements for this:

  • Do not contain confidential information
  • Must be small enough to be sent over the Internet.
  • It should be created by an easily accessible tool (it would be better if it were in the Java distribution)

Full heap dumping is not possible due to 1. and 2.

First of all, this should allow me to find a leak. Therefore, it should at least show the saved heap size for objects of each class (the size of itself + everything that it refers to). jmap -histo definitely not enough.

  num #instances #bytes class name ---------------------------------------------- 1: 14156 577318512 [B 2: 9196 47439696 [I 3: 83396 9809992 [C 

Is something like this useful at all? I do not think so.

+6
source share
4 answers

Does the client allow himself to do a memory dump without sending it to you?

If possible, Eclipse Memory Analyzer has a really easy-to-use wizard that will generate a suspected leak report. The report itself is very small.

0
source

Without knowing a little about you and your customers, it’s difficult to comment, but in my experience the client says that we have a memory leak (especially in Java), it simply means that β€œthe client system has some problems, which may or may not be related with our app "

I'll start with something simple by finding out why it thinks your application has a leak (i.e. ps or task manager showing the size of the process)

+1
source

You can force the client to run jhat and somehow connect remotely to the web server that it is running.

0
source

I would take a bunch of heaps and analyze it using YourKit. (I found it too complicated with large applications)

-1
source

Source: https://habr.com/ru/post/909726/


All Articles