Once in a while BitBucket implemented on our server becomes highly unresponsive for our users. Looking at the logs at reported time of nearly 15-second delay, we spotted below log message:
2022-04-13 10:39:45,380 DEBUG [...] USER ... USER_IP,127.0.0.1 " GET <resource> HTTP/1.1" c.a.s.i.p.GrantedPermissionVoterProvider Permission voter for user has expired and will be recalculated
This message is common in our logs and for specific users the supposed recalculation repeats each half of a second / one second, when they report us low BB performance.
What causes this recalculation and is it possible to configure BitBucket not to recalculate permissions every half of a second?