Redis: Huge latency and slow down

Hello there,

I just setup a fresh instance of Nextcloud on a root server. At first it was very quick, but after enabling Redis, the performance dropped very low, and every 3-5 requests, there is a latency of 10-30 seconds, sometimes even a timeout. Now I removed redis, and everything is quick and responsive again (latency <1 seconds).

Why is that, shouldn’t the Nextcloud run faster with redis? Did I forget something else?

I can not really help you. But I think Redis does not make sense for every installation. Maybe you only need APCu.

Memory caching — Nextcloud latest Administration Manual latest documentation

Memory caching — Nextcloud latest Administration Manual latest documentation (APCu)

Redis: “to use for distributed caching”

Maybe someone can write when to use Redis at all.

In my installation I don’t see such issues: especially with NC24 the system runs pretty smooth, browsing in the file structure, scrolling through photo album works without significant delays… If you see the system is slower with redis just don’t use it…

@devnull From my understanding redis is primarily used for file locking which is done in the database in case redis is not available.

Yes that could be. Read this.

I think file locking is less relevant on systems where there are few users or where the users do not work collaboratively. But file locking is enabled on default. But it i think it is not relevant for the posters problem. I have never deactivated file locking in config/config.php but i also do not use Redis (only APCu) on my one-user-nextcloud-instance.

1 Like

I use REDIS for transactional file locking without any noticeable slow down, but as soon as I set the nextcloud config.php value to use it for memory caching as well, everything becomes slow and unresponsive.