Skip to content

Commit

Permalink
real timeout org tree lock (#4429)
Browse files Browse the repository at this point in the history
Hotfix:

Found a significant number of timeout exceptions raised looking to
acquire the OrgTree-LOCK (used by any process needing to build the
in-memory organization tree on first request).

The default timeout of 10 seconds is clearly inadequate. Increasing to
same value (300 or 5 mins) used for the expiration of this lock (to
catch any hung processes holding on to the lock).
  • Loading branch information
pbugni authored Jan 7, 2025
2 parents fc24582 + 30f77b0 commit 17217ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portal/models/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ class OrgTree(object):
def __init__(self):
# Maintain a singleton root object and lookup_table
try:
with TimeoutLock(key=ORG_TREE_LOCK_KEY, expires=300):
with TimeoutLock(key=ORG_TREE_LOCK_KEY, expires=300, timeout=300):
if not OrgTree.root:
self.__reset_cache()
except LockTimeout:
Expand Down

0 comments on commit 17217ad

Please sign in to comment.