Expand my Community achievements bar.

SOLVED

Long garbage-collection time for AEM publish instance

Avatar

Level 1

Hello everyone,

I am facing issues with my publisher, where it takes long GC time and it is suspending process. What could be the reason behind this? Any pointers/idea?

When I look at usage score of heap memory allocation via http://<publisher>:4503/system/console/memoryusage, found that

1. PS Eden space - 75%
2. PS Survivor space - 0%
3. PS Old gen - 99%

 

What could have been wrong happening here? Any pointers!

 

1 Accepted Solution

Avatar

Correct answer by
Employee

Long thread pause times strongly indicate that your Java heap is suffering from consecutive FullGC cycles unable to reclaim any space from OldGen.

 

You will need : 

1) gc.logs (if you have them) -- then you can use something like GCEasy (http://gceasy.io/) to visualize the heap state across time. This tool is great.

2) assuming there is FullGC running consecutively, you will need to capture an HPROF file. Then you can use Eclipse Memory Analyzer (or comparable tool) to analyze the heap.  Eclipse MAT will give you a LeakSuspects report to use as a starting point to understand what is in memory. From there you can deduce why Java can't reclaim space. Often it's an accrual of unclosed resource-resolvers or something like that. 

 

In a nutshell - if you are suffering from consecutive fullGC and long thread pause times you either 

a) have a memory leak which you can figure out from an hprof capture

or 

b) the aem instance is undersized

 

Good luck

View solution in original post

2 Replies

Avatar

Community Advisor

Get the thread dump and use any of the analyzers to get more details.

Avatar

Correct answer by
Employee

Long thread pause times strongly indicate that your Java heap is suffering from consecutive FullGC cycles unable to reclaim any space from OldGen.

 

You will need : 

1) gc.logs (if you have them) -- then you can use something like GCEasy (http://gceasy.io/) to visualize the heap state across time. This tool is great.

2) assuming there is FullGC running consecutively, you will need to capture an HPROF file. Then you can use Eclipse Memory Analyzer (or comparable tool) to analyze the heap.  Eclipse MAT will give you a LeakSuspects report to use as a starting point to understand what is in memory. From there you can deduce why Java can't reclaim space. Often it's an accrual of unclosed resource-resolvers or something like that. 

 

In a nutshell - if you are suffering from consecutive fullGC and long thread pause times you either 

a) have a memory leak which you can figure out from an hprof capture

or 

b) the aem instance is undersized

 

Good luck