Adobe Experience Manager Crashes during large asset uploads



Adobe Experience Manager 6.x either crashes or is slow during a large asset upload. Heap dump analysis shows that the CQBufferedImageCache is consuming a quarter or more of the heap.

Solution:
Why issue occurs:
  • The default maximum cache size for CQBufferedImageCache is set to a quarter of the JVM heap size.  
  • To illustrate the problem, let's say you have a system with a max heap (-Xmx param) of 5 GB, an Oak BlobCache set at 1 GB, and Document cache set at 2 GB.
  •  In this case, the buffered cache would take max 1.25 GB and that would leave only 0.75-GB memory for unexpected spikes.
  • Eventually, the JVM fails with OutOfMemoryErrors. To solve the problem, reduce the configured max size of the buffered image cache.
  • When uploading large amounts of assets to Adobe Experience Manager, tune the buffered cache size by configuring it via the OSGi Web Console.
Solution:
  1. Go to http://host:port/system/console/configMgr/com.day.cq.dam.core.impl.cache.CQBufferedImageCache
  2. Set the property cq.dam.image.cache.max.memory in bytes for example, 1073741824 is 1 GB (1024*1024*1024 = 1 GB).


How to Suppress the Informational Log messages from a specific class file in a log


Statement - How to Suppress the Informational Log messages in log file to avoid the growing of log files.

Pre-requsite :
  • JRE 1.8
  • AEM 6.3 up and running.
Issues :
  • This cause log to  Bloat
  • storage cost and additional CPU cycles
  • Increasing Disk I/O
  • Leads to frequent mainatence
Solution :
  • Go to log file and find the INFO log messages in the log files and identify which INFO log messages are getting generated and log file is filled with.
  • Identify the classname - Example : 11.05.2018 17:07:04.463 *INFO* [0:0:0:0:0:0:0:1 [1526029594249] GET /aem/start.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl detected [JS] library: /libs/cq/gui/components/common/wcm/clientlibs/wcm, sourced from 13 files.

  • Go to Felix console : /system/console/configmgr
  • Search for Apache Sling Logging Logger Configuration
  • Click on +icon to create new logging configuration for com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl
  • Set Log level to WARN
  • Under Logger enter the classname com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl
  • Save the changes
  • That's it, all info messages from the class file which are logged into the error.log will be suppressed


How to find where all a particular AEM comportment used in the page of website


  • Statement - find the component usage across the website

Pre-requiste : 
        -  AEM 6.3 up and running

Solution :

Option-1:
  • Open any page in the touch UI
  • On page open -> switch to Developer view
  • On the toggle side panel click on the component
  • Click on the view component details as shown below 


  • Click on the Live usage tab to see where all the article component is used


Option- 2 :


  • Go to touch UI - Tools-->General tab--> click on components (https://localhost:/libs/wcm/core/content/sites/components.html
  • Click on the any of the component  

  • Click on Live Usage Tab to see where all this component is used.