You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"lock keys" are set in the ACA-Py Events Processor to ensure that only one instance will process a given item (a redis list of webhook events, per wallet).
These lock keys have an expiry of 500ms, where an async background task will re-set the lock key to increment the expiry time, so that it exists as long as is needed.
When load is very high, this async background task might not start soon enough, leaving a window where the lock doesn't exist anymore, resulting in the "Could not delete lock key" warning.
This may be a problem, as it opens up for the same list of events to be processed by an additional Webhooks Service instance.
The reason for the lock expiry is so that locks cannot exist indefinitely, in the case of Webhooks Service getting a sigterm mid-processing, resulting in a permanent lock.
A reasonable solution would be just to make the expiry much longer, perhaps up to 5 seconds long, so that processing time should never exceed that expiry time, and an async background task is not necessary to extend the lock. This is a trade-off in availability, as a sigterm could cause a webhook to take 5s longer to arrive than usual.
Alternatively, increase the frequency of the background task's re-setting of the lock key. This has a trade-off in increased redis traffic.
I think the first option is preferable, but let's see.
The text was updated successfully, but these errors were encountered: