Actions
Feature #28952
closedUpdate User#last_login_on only once per minute
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Description
On setups where a lot of logins happen (e.g. when heavily using the API with Basic Auth credentials), access to the@ users@ table can get contentioned due to the many parallel write queries to the table during each request as each requests sets the last_login_on column of the user to the current date in User.try_to_login
. This can result in deadlocks or general long lock waits on the database since all of these update queries will effectively be serialized per user.
By updating the last_login_on column less often, we can drastically reduce this contention. The attached patch implements this by only updating the last_login_on
column once per minute.
Files
Related issues
Actions