1

I'm running a somewhat classical postgres/hibernate/spring mvc webapp, with quite usual layers/frameworks. Everything looks fine, except when i look at the memory graph in javamelody : i periodically it seems like it grows, gc is called, then it grows again : memory graph

When i dump the memory, it's always a 60/80 Mo file, showing that the total memory used is around 60/80 Mo, and no leak is detected If i remove javamelody and use jconsole, it kinda shows the same problem, the memory keeps growing (a bit slower tho) How can i see what are these +100Mo objects, constantly growing then gc'ed ? How can i fix this problem ?

Any help or explanations regarding this kind of problem would be greatly appreciated !

Thanxs in advance

EDIT : i forgot to mention that the graph comes from an isolated env, with absolutely NO user activity on it (no http request / no scheduled job)

jon315462
  • 11
  • 3

2 Answers2

2

That is the expected behavior of the Java garbage collector. Short-lived objects are accumulated in the memory until the garbage collection algorithm determines that it is worth spending time in reclaiming that memory.

You can analyze the memory dump (for instance, with Eclipse Memory Analyzer) in order to discover where are those objects, but remember that this situation is not a problem (unless they eat all of your memory and an OutOfMemoryError is thrown).

Javier
  • 12,100
  • 5
  • 46
  • 57
  • 1
    Yes, @Javier is right, From your description there is nothing to be worried about. – Zielu Feb 24 '15 at 22:43
  • Thanxs for your anwser, however i forgot to mention that this graph shows a memory usage with absolutely NO activity / http request / scheduled job, that's why i'm worried that +100Mo objects are created repeateadly. also, the memory dump does not seem to contains these objects like i said (the total overall memory is always 60/80Mo) – jon315462 Feb 24 '15 at 23:25
0

It seems that the application server or web container which the application is deployed is running some background process (JBoss has a batch process that try to recovery the distributed transaction). Enable logging trace and see it says something. But it's nothing that you need to worry about.

Marcelo Keiti
  • 1,200
  • 9
  • 10