Several issues after upgrading to Nextcloud 21

I found a solution to the “slow login” problem: deleting redundant entries in the oc_authtoken table.
The improved login speed also fixed the issues related to Card/CalDAV clients.

Here’s a brief description of how I pinpointed the issue, in case it helps anyone:

First, I created a new Nextcloud user and took some statistics on the login wait time using the Firefox dev tools.
My user averaged 30 seconds until successful login whereas the newly created user averaged 2 seconds.
I started to look into the mysql.log (enabled with set global general_log=1; as root DB user) and found many queries of the form:

update oc_authtoken set password = 'xxxxx' where id = xxx;

There were about 100 of these queries for every login attempt of my user which caused the login slowness.
I duplicated the table (as a backup) and then deleted all rows related to my user with:

delete from oc_authtoken where login_name = '<username>';

The average login wait time is now around 4 seconds.

5 Likes