Memory leak on server?


#1

When starting the urbackup service, it occupies less than 20MB.
A few days later, it grows to a few gigabytes.
After restarting the service, it gets back to less than 20MB.

Running on Ubuntu 18.04, storage is on ext4.


#2

How much RAM on server, how many clients backed up?

Database servers use available RAM if it’s there to optimize performance.


#3

6GB total RAM, 4 clients.

Another thing I noticed, is that right when the service starts, it uses about 6 processes, and it grows from there to 100+ processes over time. I don’t know if it’s normal behavior.


#4

Hi

If it s really that, it doesn’t sounds right.
I can actually do nothing for you , but you should post more detailed infos, like process list and ram usage using the most precise way you can think of. To know if t s memory used, resident, shared, if it’s the urbackup process , or the total threads on server and whatnot. Maybe compare after 1 day, one week, one month usage.


#5

The threads also have names and it would be interesting which ones are running. There should be ~2 per idle running client.

htop can be setup to show them + ps with option e.g. -o 'pid tid cmd comm'


#6

I have noticed the same on my server. Two days ago the machine was running out of RAM (8GB)+Swap (1GB). No backups were in process. The urbackupsrv process was using almost all of it. I restarted it and it went back down to less than 100MB usage (I don’t recall the exact amount). It’s now about 460MB. I’m running 2.2.11 compiled from source on Slackware64 14.2.


#7

This is a server instance running for > 3 days as an example (htop, Linux):

It has a lot of active backups and clients so the memory usage is okay. It has 260 threads. For memory usage you’d need to substract the SHR column from the RES column. The VIRT column is kind of irrelevant for memory usage.