Back

Redis use all the CPUs

  • 0
  • Self Hosted
  • General
Ibaraki Douji
31 Jul, 2024, 16:30

Found another solved thread here : https://discord.com/channels/564160730845151244/1220320274982109245

As he shown i also had my redis going at 90+% CPU tho i'm on 1.5.7.

Looking at the container i think the issue is that my redis container was updated by WatchTower and made the container recreate itself. With that recreation i think appwrite send A LOT of request to redis tho all the previous data was erased because of the recreation of the redis container

A "fix" for this is to just restart all the appwrite stack (compose) and the CPU will go down.

TL;DR
Developers are seeing Redis use all CPUs on a Ubuntu server with a specific setup. The issue may stem from the `realtime` container. Downgrading Redis may help, and a new version with caching fixes is coming soon. Make sure to stick to the default containers defined in the compose file to avoid issues. Restarting only the `realtime` container seems to resolve the high CPU usage. Further details and steps for reproduction are requested on the GitHub issue: <https://github.com/appwrite/appwrite/issues/8464>.
Ibaraki Douji
1 Aug, 2024, 11:52

this is 5m after the recreation

Ibaraki Douji
1 Aug, 2024, 12:01

realtime is the issue i think

ID | Container Name | CPU % | MEM usage | mem% | net I/O | Storage | PID

Ibaraki Douji
1 Aug, 2024, 12:05

YUP after restarting ONLY the realtime container redis is back to 1% CPU as well as the realtime container

Ibaraki Douji
1 Aug, 2024, 14:28

Also since i can reproduce this state, if you want more elements i can send them (just tell me what you want and how to get it and i will do it)

D5
2 Aug, 2024, 08:44

If you have precise reproduction steps, it will be great and very appreciated to have a GitHub issue with the steps so the team can have a follow of it, debug and apply a fix in future releases πŸ˜„

Ibaraki Douji
2 Aug, 2024, 11:56
Evdog
2 Aug, 2024, 15:50

Going to need a bit more details on that, especially server specs and the exact setup you have to recreate

Evdog
2 Aug, 2024, 15:56

also remember, it's not a flat out 90% cpu usage, this is my setup rn

Evdog
2 Aug, 2024, 15:59

would highly recommend using the default containers as defined by the compose we have, if you're adding auto updates to dependent services you might run into problems. redis:7.2.4-alpine should be the latest one we officially support

Evdog
2 Aug, 2024, 16:00

1.5.8 is being deployed very soon which does include some caching fixes so you might want to keep an eye out for that

Ibaraki Douji
2 Aug, 2024, 16:21

Currently this runs on a Ubuntu server 22.04 with 30GB of ram and 8 vCPU I'm running the stack through portainer as it's easier for me to manage.

In the compose i only changed some traefik settings to make it work with mine And the appwrite/appwrite, mariadb and docker.io/redis to latest I also made the worker in x5 replicas but this should not be the cause

Since you told that the latest supprted was 7.2.4 i will downgrade it to see

Shiba
18 Aug, 2024, 17:18

which command shows this statistics. ?

Ibaraki Douji
18 Aug, 2024, 21:00

docker stats (is also used grep to only have appwrite containers so docker stats | grep appwrite)

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more