Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

CPU uses 95% in AEM on permise server

Avatar

Level 4

Hi Support, 

 

Hope you are well.

 

Currently we are using aem version is 6.5.15. Java uses showing 700% in system.

There are multiple background jobs running, it's showing approx 300 jobs in the queue.

 

Please find the below logs for your reference-

 [sling-cq-polling-importer-6-myDataSource] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name 0654f74c177ec80b60f7922a9a6195cf. Will not be used for login.
06.07.2023 14:46:10.098 *ERROR* [qtp1875553410-156] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name 0654f74c177ec80b60f7922a9a6195cf. Will not be used for login.
06.07.2023 14:46:08.833 *ERROR* [qtp1875553410-2230] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name 0654f74c177ec80b60f7922a9a6195cf. Will not be used for login.
06.07.2023 14:46:11.388 *ERROR* [qtp1875553410-2233] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name 0654f74c177ec80b60f7922a9a6195cf. Will not be used for login.
06.07.2023 14:46:15.245 *ERROR* [FelixDispatchQueue] org.apache.sling.event FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory exception: Could not obtain lock)
06.07.2023 14:46:15.246 *ERROR* [qtp1875553410-2237] org.apache.jackrabbit.oak.spi.security.authentication.external.impl.ExternalLoginModule No IDP found with name 0654f74c177ec80b60f7922a9a6195cf. Will not be used for login. 

 

Please help to resolve this issue.

 

Thanks

Bhagchand Saini

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @bhagchand 

 

1: Generate the Thread dump and analyze. https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-16458.html?lang=en 

 

This might help you find any long running threads or waiting on each other or a common resource.

 

2: Avoid any long running threads/sessions. Improve the multi-threaded implementations

 

3: Do you have a lot of Event Handlers in code? It yes, please consider switching to Sling Jobs

 

4: For asset processing, preferably do it in batches

 

5: Also, please refer to following videos from Adobe on debugging performance/ memory related issues in AEM

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/troubleshooting/steps-to...

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/troubleshooting/how-to-t... 

 


Aanchal Sikka

View solution in original post

8 Replies

Avatar

Community Advisor

Hi @bhagchand ,

Please check on below article where a similar issue is addressed. 
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-takes-significant-high... 

Also, you can monitor the instance performance in the below dashboard. 
http://localhost:4502/libs/granite/operations/content/monitoring/page.html

 

You can also increase the heap size while starting up the instance by updating the start.bat / passing the param.  Details are given in below thread. 
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-resolve-out-of-memo... 

Avatar

Level 6

Hello @bhagchand,

When you say "multiple background jobs running", are you referring to the Background Operations page  "http://localhost:4502/mnt/overlay/granite/async/content/asyncjobs.html"

or are they custom publishing workflows or sling jobs or something else?

 

Are you seeing high CPU on Author or Publisher or both?

 

thanks,

Preetpal 

Avatar

Level 4

Hi @Preetpal_Bindra ,

 

CPU high only on author instance now we are unable to build the package from crx/de.

Avatar

Community Advisor

Hello @bhagchand  - 

 

From the logs you provided, there seem to be a couple of issues in your AEM environment:

 

1. The statement "Java uses showing 700% in system" indicates that the Java process running AEM is utilizing a high amount of CPU resources. This could be a result of multiple factors, including heavy processing by background jobs or inefficient code execution. To address this, you may need to optimize your code, ensure efficient resource utilization, and consider scaling your environment if necessary.

 

2. The log messages mentioning "No IDP found with name" indicate that an Identity Provider (IDP) with the given name could not be found. This could be related to authentication or login modules configured in AEM. Review your authentication and login module configurations to ensure they are correctly set up and that the necessary IDPs are configured and accessible.

 

3. The log message "Could not obtain lock" suggests a problem with acquiring a lock for a service. This can be due to contention or deadlock issues. Review the relevant service configuration and analyze the locks and synchronization points in your code to identify any potential conflicts or bottlenecks.

 

Avatar

Community Advisor

To get the exact root cause of issue get the heap dump and analyze it.

Avatar

Correct answer by
Community Advisor

Hello @bhagchand 

 

1: Generate the Thread dump and analyze. https://experienceleague.adobe.com/docs/experience-cloud-kcs/kbarticles/KA-16458.html?lang=en 

 

This might help you find any long running threads or waiting on each other or a common resource.

 

2: Avoid any long running threads/sessions. Improve the multi-threaded implementations

 

3: Do you have a lot of Event Handlers in code? It yes, please consider switching to Sling Jobs

 

4: For asset processing, preferably do it in batches

 

5: Also, please refer to following videos from Adobe on debugging performance/ memory related issues in AEM

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/troubleshooting/steps-to...

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/troubleshooting/how-to-t... 

 


Aanchal Sikka