Expand my Community achievements bar.

AEM 6.2 Session refresh issue

Avatar

Level 2

HI All,

We have started getting the following exception all of a sudden and instance shutting down after 4 minutes. please help

07.12.2016 16:18:49.769 *WARN* [sling-default-1-com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl.1446] org.apache.jackrabbit.oak.jcr.session.RefreshStrategy This session has been idle for 1 minutes and might be out of date. Consider using a fresh session or explicitly refresh the session.
java.lang.Exception: The session was created here:

 

Thanks,

Phani

6 Replies

Avatar

Level 4
        Could you please share the complete log file. As this is just a warning not a error, there should be some other error message .

Avatar

Level 2

org.apache.jackrabbit.oak.jcr.session.RefreshStrategy This session has been idle for 1 minutes and might be out of date. Consider using a fresh session or explicitly refresh the session.
java.lang.Exception: The session was created here:
        at org.apache.jackrabbit.oak.jcr.session.RefreshStrategy$LogOnce.<init>(RefreshStrategy.java:169)
        at org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:277)

Avatar

Level 7

I am seeing the same errors in logs and i am using aem 6.3, any solution for this ? any configuration changes that i need to do?

Avatar

Level 2

Hi, Did you find a solution for this?

Avatar

Level 10

How are you obtaining your session!

Avatar

Level 2

Hi Scott,

This is the below code i am using

private Session session = null;

private ResourceResolver resourceResolver = null;

try {

resourceResolver = resolverFactory.getServiceResourceResolver(null);

session = resourceResolver.adaptTo(Session.class);

//do some processing

} catch (Exception ex) {

} finally {

if (resourceResolver != null) {

resourceResolver.close();

}

}