Could not lock page exception

We are getting this exception often

ERROR [org.apache.wicket.DefaultExceptionMapper.mapUnexpectedExceptions():170] Unexpected error occurred Could not lock page 1. Attempt lasted 1 minute

We are not able to determine what causes this exception. One thing we noticed that for some of the custom imagesets defined, the renditions are not created properly causing this exception in the log files “Cannot retrieve dimensions of original or thumbnail image”. The authors when trying to edit this images it says nullpointerexception. We should be able to fix this but does this define the “Could not lock page” exception defined above?

There may be multiple processes try to update JCR at the same time and one of them take too much time to complete. In JCR, all the writing event use the same write lock so such locking exception is likely to appear.
On our system, we reduce that by override the Jackrabbit AccessManager

That specific exception is a wicket exception that only means some process ran too long. It’s basically only a UI error saying that it doesn’t want to wait anymore. This may be related to the other problems you mention, but only as a symptom. I would expect. The message about not being able to retrieve dimensions and the NPE’s are more worrisome. I would expect more errors in the log. Try and download the images from the console. I also suggest you run a consistency check.

which CMS version are you running?

hippo version release 11.2.1
hippo cms version 4.2.6

Not sure if this happens if you have multiple images queued for upload, if so, you might be affected by this bug:

Doesn’t look like multiple images were queued up or uploaded during the time. As a first step, we are planning to fix the rendition problem and as a second step as @jasper.floor suggested we will run the repo consistency check and see if this addresses the problem, if not we will dig in more into the log files. Will keep y’all posted