[ 
https://issues.apache.org/jira/browse/SLING-8002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu updated SLING-8002:
-----------------------------------
    Fix Version/s: Distributed Event Admin 1.1.4

> DistributedEventReceiver utilizes long-running session
> ------------------------------------------------------
>
>                 Key: SLING-8002
>                 URL: https://issues.apache.org/jira/browse/SLING-8002
>             Project: Sling
>          Issue Type: Improvement
>          Components: Event
>    Affects Versions: Distributed Event Admin 1.1.2
>            Reporter: Jörg Hoh
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: Distributed Event Admin 1.1.4
>
>         Attachments: SLING-8002.patch
>
>
> We recently came across this warning in our logs. Looks like the 
> DistributedEventReceiver uses a long-running session, thus causing warnings 
> from Oak.
> {noformat}
> 10.10.2018 10:02:37.620 *WARN* [Thread-51] 
> org.apache.jackrabbit.oak.jcr.session.RefreshStrategy This session has been 
> idle for 5 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:170)
>  
>         at 
> org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:285)
>  
>         at 
> com.adobe.granite.repository.impl.CRX3RepositoryImpl.login(CRX3RepositoryImpl.java:150)
>  
>         at 
> com.adobe.granite.repository.impl.CRX3RepositoryImpl.login(CRX3RepositoryImpl.java:241)
>  
>         at 
> com.adobe.granite.repository.impl.SlingRepositoryImpl$4.run(SlingRepositoryImpl.java:177)
>  
>         at 
> com.adobe.granite.repository.impl.SlingRepositoryImpl$4.run(SlingRepositoryImpl.java:174)
>  
>         at 
> java.security.AccessController.doPrivileged(AccessController.java:686) 
>         at javax.security.auth.Subject.doAsPrivileged(Subject.java:729) 
>         at 
> com.adobe.granite.repository.impl.SlingRepositoryImpl.createServiceSession(SlingRepositoryImpl.java:174)
>  
>         at 
> org.apache.sling.jcr.base.AbstractSlingRepository2.createServiceSession(AbstractSlingRepository2.java:166)
>  
>         at 
> org.apache.sling.jcr.base.AbstractSlingRepository2.loginService(AbstractSlingRepository2.java:381)
>  
>         at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderStateFactory.createProviderState(JcrProviderStateFactory.java:116)
>  
>         at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.authenticate(JcrResourceProvider.java:304)
>  
>         at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.authenticate(JcrResourceProvider.java:76)
>  
>         at 
> org.apache.sling.resourceresolver.impl.providers.stateful.ProviderManager.authenticate(ProviderManager.java:161)
>  
>         at 
> org.apache.sling.resourceresolver.impl.providers.stateful.ProviderManager.getOrCreateProvider(ProviderManager.java:87)
>  
>         at 
> org.apache.sling.resourceresolver.impl.providers.stateful.ProviderManager.authenticateAll(ProviderManager.java:129)
>  
>         at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.createControl(ResourceResolverImpl.java:138)
>  
>         at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.<init>(ResourceResolverImpl.java:100)
>  
>         at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.<init>(ResourceResolverImpl.java:94)
>  
>         at 
> org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolverInternal(CommonResourceResolverFactoryImpl.java:263)
>  
>         at 
> org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getServiceResourceResolver(ResourceResolverFactoryImpl.java:96)
>  
>         at 
> org.apache.sling.event.dea.impl.DistributedEventReceiver$1.run(DistributedEventReceiver.java:139)
>  
>         at java.lang.Thread.run(Thread.java:785) 
> {noformat}
> Either the scope of the session should be reduced, or the session should be 
> refreshed before writing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to