Either or these errors is randomly logged in the AEM logs:
java.lang.IllegalStateException:This session has been closed at
java.lang.IllegalStateException: Resource resolver is already closed.
This can be caused by multi-threaded use of the same ResourceResolver or by closing a ResourceResolver or javax.jcr.Session that you didn't open in your own code.
Session and ResourceResolver objects that are obtained via the SlingRequest or WorkflowSession do not close by your application. For example:
That resolver or session closes automatically after the request has been processed.