CPU uses 95% in AEM on permise server | Community
Skip to main content
Level 3
July 6, 2023
Solved

CPU uses 95% in AEM on permise server

  • July 6, 2023
  • 5 replies
  • 1904 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

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-resolve-memory-related-issues.html?lang=en

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/troubleshooting/how-to-troubleshoot-performance-related-issues.html?lang=en 

 

5 replies

Vaibhavi_J
Level 7
July 6, 2023

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-cpu-and-spikes-when-many-requests-are/td-p/560640 

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-memory-error-java-heap-space/m-p/284037 

Preetpal_Bindra
Community Advisor
Community Advisor
July 6, 2023

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 

bhagchandAuthor
Level 3
July 7, 2023

Hi @preetpal_bindra ,

 

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

Tanika02
Level 7
July 6, 2023

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.

 

bhagchandAuthor
Level 3
July 7, 2023

@tanika02  Thanks let me check

DPrakashRaj
Community Advisor
Community Advisor
July 7, 2023

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

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
July 7, 2023

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-resolve-memory-related-issues.html?lang=en

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/troubleshooting/how-to-troubleshoot-performance-related-issues.html?lang=en 

 

Aanchal Sikka
bhagchandAuthor
Level 3
July 7, 2023

Thanks @aanchal-sikka let me check