Is there an issue with Hestia x Redis?

Hey,

I’m not that good in english so I would first like to mention that I’m not complaining and hestia is the best panel I ever found and I’m willing to stick with it forever :innocent: + I’ve been astounished by the amount of ressources there is here!

I have only one issue, is that redis gets OOM killed very often, and when it is not, everything on my ecoms feel “laggy” (by everything I mean add to cart and checkout) BUT if I remove redis, everything is pretty ok.

Here is a screen that I took 5mn ago for exemple before doing a reboot:

On the other server I run that I’m going to migrate to hestia, it’s pretty fine with the same amount of domains and less ressources

Someone has an idea?

Thanks! :grinning_face_with_smiling_eyes:

Hi @Jollip

Then maybe you don’t need redis…

Your system is running out of RAM, it’s not just Redis that’s being killed, but also MariaDB. You should probably check your free and used memory.

free -h

You can also check which processes are consuming the most real memory (rss):

Results in KB

 ps -eo pid,comm,rss,vsz --sort=-rss | head -n20

If you want them in MB:

ps -eo pid,comm,rss,vsz --sort=-rss | awk 'NR==1{print "PID\tCOMMAND\t\t\tRSS(MB)\tVSZ(MB)"} NR>1{rss=$(NF-1);vsz=$NF;$NF="";$(NF-1)="";cmd="";for(i=2;i<=NF-2;i++)cmd=cmd $i " ";printf "%-8s %-25s %-8.1f %-8.1f\n",$1,cmd,rss/1024,vsz/1024}' | head -n20

I would also recommend setting a maximum memory limit for Redis (adjust it based on your needs):

maxmemory 256M
maxmemory-policy allkeys-lru

I would also check other processes, since Redis is using about 250–300 MB, which doesn’t seem excessive.

Note: Next time, please, avoid uploading a screenshot to show logs, it’s much easier to read and help when you paste the text directly.

It’s possible that sometimes redis is useless?

root@cp:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           7,7Gi       1,5Gi       397Mi       305Mi       6,3Gi       6,2Gi
Swap:          4,0Gi       497Mi       3,5Gi
    PID COMMAND           RSS    VSZ
   1285 mariadbd        259744 1918076
    843 redis-server    250340 561596
 121725 php-fpm8.4      206700 848552
 121733 php-fpm8.4      154108 907236
    842 php-fpm8.4      33892 786084
    835 fail2ban-server 28372 1147352
    416 multipathd      27008 288952
   1492 nginx           26024 732624
 121090 php-fpm8.4      25920 787144
 120700 php-fpm8.4      24128 785732
 121736 php-fpm8.4      22080 787144
 121735 php-fpm8.4      21824 787144
 121766 php-fpm8.4      21696 787144
 121767 php-fpm8.4      21696 787144
 121741 php-fpm8.4      21568 787144
   1497 nginx           20648 732348
 121740 php-fpm8.4      20160 785732
    377 systemd-journal 17324 132440
   1493 nginx           14888 732348
1285     mariadbd                  253.7    1873.1
843      redis-server              245.2    548.4
121785   php-fpm8.4                184.8    880.4
121788   php-fpm8.4                178.3    810.5
121781   php-fpm8.4                119.9    855.7
842      php-fpm8.4                33.1     767.7
835      fail2ban-server           27.7     1120.5
416      multipathd                26.4     282.2
1492     nginx                     25.4     715.5
120700   php-fpm8.4                23.7     767.3
121786   php-fpm8.4                21.3     768.7
121784   php-fpm8.4                21.2     768.7
121780   php-fpm8.4                21.1     768.7
121783   php-fpm8.4                21.1     768.7
121782   php-fpm8.4                20.9     768.7
121779   php-fpm8.4                20.2     767.3
1497     nginx                     20.2     715.2
377      systemd-journal           16.9     129.3
1493     nginx                     14.5     715.2

All right thanks max memory was at 1gb, to be honest I’m not sure what was needed, I have 20 woocommerce websites, but not that much trafic 1-30 visitors daily for all of them (at max 50) so it’s many websites but very rarely visited (and correctly cached, with an infinite page cache on wordpress since they are not that much visited)

(sorry for the screen on the first post)