# Several issues after upgrading to Nextcloud 21

**URL:** <https://help.nextcloud.com/t/several-issues-after-upgrading-to-nextcloud-21/113118>\
**Category:** ℹ️ Support\
**Tags:** update\_problems, nc21\
**Created:** [April 9, 2021, 4:51pm UTC](https://help.nextcloud.com/t/several-issues-after-upgrading-to-nextcloud-21/113118 "2021-04-09T16:51:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fabsta](https://help.nextcloud.com/letter_avatar/fabsta/32/5_5575768a8748004e209b776fc1b2916d.png) [@fabsta](https://help.nextcloud.com/u/fabsta)\
**Post date:** [April 16, 2021, 3:04pm UTC](https://help.nextcloud.com/t/several-issues-after-upgrading-to-nextcloud-21/113118/3 "2021-04-16T15:04:23Z")

</div>

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:

```sql
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:

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

```

The average login wait time is now around 4 seconds.

---

_[View the full topic](https://help.nextcloud.com/t/several-issues-after-upgrading-to-nextcloud-21/113118)._
