Login takes a long time

Nextcloud version : 21.0.1
Operating system and version : Linux 3.10.105 x86_64
Apache or nginx version : 2.4.43-0015
PHP version : 7.4.9
REDIS version : 5.0.7-6
Size of oc_filecache : 11350 records
Number of files in my data directory : 7210

The issue you are facing:
The login is very long : up to 16 seconds.
During 12 seconds of the login procedure , Nextcloud operates 100 IO read/second and 180 IO write/second, which represents a total of 8,7 MB written on the mariaDB database !!!
Why does need Nextcloud such a huge volume of data treatments during login ?
How can we optimise it ?

Is this the first time you’ve seen this error? (Y/N): always

Hi @PierreGLV9,
which background jobs are you using?
do you use opcache and php-fpm?

see this for more informations : Server tuning — Nextcloud latest Administration Manual latest documentation

Hello !
Yes opcache, php-fpm and Redis

@PierreGLV9 maybe this topic can help you to solve the problem but currently this topic isn’t solved for the user : Very slow login after updating to 21.0.1