RAM saturated by some yunohost process / RAM saturée par certains processus de yunohost

Yunohost 11.1.0.2 (testing, la version envoyée par erreur sur la branche stable)
VPS Hetzner CX 31 (8Go RAM 2 vCPU intel)
Interface admin + SSH

I don’t know why but some process consume a lot of ram. Some ideas ?
Thanks a lot !

Je ne sais pas pourquoi mais certain processus consomment beaucoup de ram sans raison, vous auriez une idée de pourquoi ?


504.9 MiB + 103.0 KiB = 505.0 MiB       scsi_tmf_2 [deleted] (22)
510.7 MiB +  79.5 KiB = 510.8 MiB       cron [deleted] (25)
536.7 MiB +  87.0 KiB = 536.8 MiB       atd [deleted] (30)
562.5 MiB +  76.0 KiB = 562.6 MiB       yunohost-api [updated] (26)
600.4 MiB +  80.5 KiB = 600.5 MiB       agetty [deleted] (27)
896.5 MiB + 141.0 KiB = 896.7 MiB       qmgr [deleted] (44)

I don’t understand the table below your post. What makes you say ‘some processes’ use a lot of ram, and what is ‘a lot’?

Do you have htop installed, and have a look there to see which processes use a lot of RAM?

1 Like

I used the ps_mem -S command and copy the last lines. I have my 8Go of ram full but I don’t have many users (10 users) and app (list below) …

Archivist
Bludit x3
My Webapp
OpenSondage
Mattermost
Multi custom webapp x3
Kanboard
Shaarli x 3
Wallabag
Dokuwiki
FreshRSS
RSS-Bridge

I haven’t used ps_mem, so I am not quite sure what the output means, or what it says about free memory.

htop divides memory in a section ‘used’, ‘cached’ and ‘free’. I suspect you see little ‘free’ memory, and not so much ‘used’ memory, and a lot of memory used for caching. After all, RAM that is not being used is a waste of energy, hardware and performance.

1 Like

I don’t know how share you htop result so I video screenshot my computer : Lufi - Disroot file uploader

You already sorted by memory usage ascending; only mysql, netdata, mattermost and rspamd use more than 1% (80 MB).

The interesting bit is the graph on top, where it shows whether RAM is free, used or cache.

I realize free -h also shows it, in my case:

$ free -h 
               total        used        free      shared  buff/cache   available
Mem:           976Mi       358Mi        76Mi       130Mi       540Mi       343Mi
Swap:          499Mi       499Mi       0.0Ki

The available amount looks funny here, probably because swap is stretched thin as well.

8Go being full is surprising in your case.

But what you show us doesn’t give any hint about what is memory consuming, all shown processes use very few ram.

That might be the thing here ?


Appart from finding what uses a lot of RAM of it the case (are you actually limited by the amount of RAM available ? Is there processes crashing because of full memory ?), you could use zram to virtually extend it for “free” (a few CPU ressources) : zram [Wiki ubuntu-fr]

1 Like

Thank for your response. I don’t know how to answer you because I don’t know much about it technically. I don’t know why the memory is saturated after a few days since August.

5 days ago, mysql crashed again because of saturated memory (I guess) (here are the logs) and I restart my vps and since, only 2go of memory is used. It’s been a long time since it was so stable. I dont understand…

mysql crashed again this morning : hastebin

Could you try getting as screenshot of just the top of htop?
Like so:

The corresponding status of free -h is:

# free -h 
               total        used        free      shared  buff/cache   available
Mem:           976Mi       388Mi        60Mi       125Mi       527Mi       316Mi
Swap:          499Mi       499Mi       0.0Ki

How is it in your case?

I speculated about memory being ‘used up’ by cache, but that would not lead to OOM-kills.

Hello, thanks for your answer. Here we are :

that’s not the right way to analyze ram consumption with htop or whatever all these tools,
there is a data, and that data is a data, its a fact that the ram being used,

in servers, generally, what can consume a huge ram with LCK segments stuck in buffering is mostly php,
i do programming in php over 10 years and i can tell you a small mistake at the code can lead to ram consumption and in worse situations can lead to processor frequency overload,

other possibilities is a system components, or incompatibility of other system components,

when we have a system with such issue we need to reverse engineering till we get the point where the troubles begins,

the first thing i want you to do before you’re trying anything, is to make a back up of your apps / databases and download them to your computer so it will be safe to mess with the server, because what i am going to instruct you to do is extremely dangerous and can lead to data loss,

if your data is important to you so you need to make a backup first,

then we can move forward from there,
you have an issue which you will never solve that way just by looking into the performance indicators programs every time,

if you’re interested just reply me when you done doing your backups and did download them into your home’s computer

========

a backup should be done through the admin panel and then you need to use ftp to download them into your own computer if you don’t know how to do it comment here i will explain exactly what to do, i assume you have the basic knowledge to do it

1 Like

Thanks a lot for your help.
mysql crashed again yesterday so I restarted my VPS. Backup are made every night on another server and Hetzner make a snapshot everyday and keep it seven days.
I download all off this on my computer.
So, I’m ready !

@pcet sure,

okay so first thing is now if you say so, you have a backup and all sets,

first things first i need you to answer please for several questions so it will be easier for me to build a scheme

please paste all the apps list what being currently installed on the server through yunohost
here:
simply go to the admin panel > apps > copy the list of all of them

as if i understand right, do you have any custom website installed aside yunohost official?

1 Like

Archivist
Bludit x3
My Webapp
OpenSondage
Mattermost
Multi custom webapp x3
Kanboard
Shaarli x 3
Wallabag
Dokuwiki
FreshRSS
RSS-Bridge
SnappyMail

I have not installed any custom website aside yunohost official (But Kanboard is no longer maintained)

hey

okay i am keeping on my file the list so we will need it later,

so lets begin,

the first thing before we do anything else,
please install glances on your server so we will have a much precise details,

go to your console as root and type:
install pip

then:
pip install glances[all]

run it, with the next command:
glances

it will open glances and at the top left corner it will show your domain name, if for privacy or some any reason you’re not willing to show your real domain (yunohost domain) that’s the reason i am telling you about it, you might not noticed that so you can delete it while copy glances details,

please tell me what OS are you using on your home computer is it windows or linux?
i am asking cause i am not so sure you will be able to copy paste glances screen, if you do fine that will be great if not, i will tell you how to do it with some tool

again for privacy reason i want you to remember that if ever i will ask to paste glances details, you will remember to delete the domain form the left top corner,
if you dont care about it as i don’t, so thats even better,

here the screenshot
Sort by CPU :

Sort by RAM :

thanks,

okay, in here with glances as you see we have much precise details in what’s happening on the system,
so in general everything looks normal, but that in concern your system uptime is about 1 day, and as i understand the ram consumption is happening after a while,

your mariadb is consuming 30% of 8g which is 8000/100*30 = 240mb
which is little bit too much for mariadb server but that doesn’t tell anything yet,

please tell me this i just want to make sure,
you do have “My Webapp” installed, so to the first question i did ask, did you install any “external website” with my webapp on your server ?

1 Like

Yes, mysql crashed yesterday so I restart my Hetzner VPS.

Yes :

  • my_webapp : just a ftp serveur where I test html/css pages
  • multi custom webapp : just a hugo static blog
  • multi custom webapp : phplist for sending newsletters

How I close Glances ? control+C ? (does it consume cpu?)

i did marked for myself the list of external websites we will back to them later,

glances can get out by CTRL+X