diff --git a/auth_saml/models/auth_saml_provider.py b/auth_saml/models/auth_saml_provider.py index 94c45de06e..e047322617 100644 --- a/auth_saml/models/auth_saml_provider.py +++ b/auth_saml/models/auth_saml_provider.py @@ -421,6 +421,8 @@ def action_refresh_metadata_from_url(self): if not providers_to_update: return False + # Set the local timeout to 15 sec to avoid deadlocks when all token expired + self.env.cr.execute("SET LOCAL lock_timeout = '15s'") # lock the records we might update, so that multiple simultaneous login # attempts will not cause concurrent updates