Developer
System Administrator
DevOps
Jahia 8.2
Jahia 8.1
Jahia 8
How to investigate the origin of a high JCRSession load?
Question
How to investigate the origin of a high JCRSession load?
Answer
Usually, a high JCRSession load implies:
- a high load with your websites
- an issue in the way you create the JCRSession in your custom code
For this last case, to identify the faulty code, you can execute the following Groovy script:
log.info("Check sessions trace - START");
for(def sessionObject : org.jahia.services.content.JCRSessionWrapper.getActiveSessionsObjects().values()){
for(def trace : sessionObject.thisSessionTrace.getStackTrace()){
log.info(" " + trace);
}
}
log.info("Check sessions trace - END");
It will return the stack trace where the JCRSession has been created.