Showing posts with label CPU Usage. Show all posts
Showing posts with label CPU Usage. Show all posts

April 23, 2020
Estimated Post Reading Time ~

AEM Memory Issues and How to Fix

Symptoms of a memory issue
  • AEM crashes randomly and in the logs, OutOfMemoryError is observed
  • AEM gets slower over time and eventually crashes
  • AEM is unresponsive
Diagnosing a memory issue
  • Search the log files for OutOfMemoryError, if you find any matches then you have a memory issue
  • Review the http://aem-host:port/system/console/memoryusage screen
  • If the "Old Generation" (JDK 7 and earlier) or "Tenured Generation" (JDK8 or later) usage is high then this could be a sign of a heap memory utilization issue. Click "Run Garbage Collector" to request the JVM to run a full heap garbage collection. If the high heap utilization stays high after requesting GC then there is likely an issue. On an AEM instance with Oak Tar storage, if the tenured usage is higher than 3GB then there might be a problem. High heap utilization on a system with Mongo storage could be due to the in-memory cache configuration.
  • Take thread dumps and top output and perform thread analysis. Check if the threads causing high CPU utilization are native JVM Garbage Collection threads. If the thread using the most CPU time is the "VM Thread" or any garbage collection threads then there is likely a memory issue.
What causes memory issues
  • Java application memory leak
  • Java Finalizer pile up due to incorrect use of finalizing in custom code
  • Insufficient max heap configuration
How to analyze the cause of your memory issue
  • See this article for details on how to capture a heap dump.
  • The best way to identify the cause of a memory issue is to analyze a heap dump.
  • Once you've captured a Heap Dump file then open it in Eclipse MAT or IBM Memory Analyzer tool. In Eclipse MAT, run the Leak Suspects report and open the "Thread Details" view to see potential causes for the memory issue.
Solutions to common memory issues
  • Optimize your application code to utilize less memory if you notice long garbage collection pauses. Most Garbage Collection issues can best be solved by optimizing the application versus tuning the JVM.
  • If you have already optimized your application and still experience long GC pauses then focus on tuning the JVM.


By aem4beginner

AEM Common critical issues and their fixes

Follow the Below URL:
https://helpx.adobe.com/experience-manager/kb/common-critical-AEM-issues.html#MemoryIssues


By aem4beginner

AEM CPU at 100% -Analyze slow and blocked processes

Follow this adobe article :

https://helpx.adobe.com/experience-manager/kb/AnalyzeSlowAndBlockedProcesses.html


By aem4beginner

AEM Command to check CPU usage & how to interpret the results

To analyze the problem, it is important to know if CRX /CQ is running in an endless loop, or if it's merely sleeping. To find it out, type

top
  • This command gets you the list of processes, sorted by CPU usage.
  • If the top process is a "Java process, and if the PID matches CRX/CQ, then the process is running full speed.
  • If you are unsure how to interpret the results, run the following statement, and then include the file top.txt in your problem report:
top -l5 -s5 > top.txt


By aem4beginner

AEM Typical situations causing high CPU consumption

Issue: High CPU utilization

Solution: Below maintenance activities can cause High CPU utilization:
  • Tar compaction,
  • Datastore garbage collection,
  • Online backup,
  • Tree activation,
  • Indexing,
  • Online compaction,
  • Deployment of an application update causing caches to be flushed
  • Workflow asset update
  • Indexing Merge.


By aem4beginner

AEM What causes CPU at 0% consumption

Issue:
What can be a reason for a 0% CPU consumption

Solution:
  • A java level deadlock can cause such a situation.
  • In this case, take a few thread dumps for the analysis
  • Restart the AEM instance.
  • the subsequent issue raises an adobe support ticket


By aem4beginner