High Memory Usage / Potential Memory Leaks Investigation Thread

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
lennardw
Newbie
Newbie
Posts: 23
Joined: July 10th, 2010, 4:32 am

Re: High Memory Usage / Potential Memory Leaks Investigation

Post by lennardw »

Hi,

Just so you know. The memory issues have remained for me for quite a while. I have updated my system to Centos 6.x (complete re-install of the virtual server), the issues remained, including the current Betas. I did however find something interesting, which appears to have resolved the issues for me.

I had an 'incomplete sab-stuff' file system on my Centos boxes so to speak, so it always a "Lost+Found" directory. I created a directory in there, and pointed SABnzbd+ to use that directory as a 'incomplete' directory, rather than the 'root of the dedicated file system, and I have no more issues since. So maybe (just maybe) it had something to do with the lack of permissions on the Lost+Found directory (owned by root, 0700 permissions), or maybe even the Plus sign in it.

I changed the above about a month ago and have had no issues since. Itmay be a coincidence, but it appears to be resolved it for me.


At any rate... I'm a happy camper!! I hope this helps other people too.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: High Memory Usage / Potential Memory Leaks Investigation

Post by sander »

lennardw wrote:Hi,

Just so you know. The memory issues have remained for me for quite a while. I have updated my system to Centos 6.x (complete re-install of the virtual server), the issues remained, including the current Betas. I did however find something interesting, which appears to have resolved the issues for me.

I had an 'incomplete sab-stuff' file system on my Centos boxes so to speak, so it always a "Lost+Found" directory. I created a directory in there, and pointed SABnzbd+ to use that directory as a 'incomplete' directory, rather than the 'root of the dedicated file system, and I have no more issues since. So maybe (just maybe) it had something to do with the lack of permissions on the Lost+Found directory (owned by root, 0700 permissions), or maybe even the Plus sign in it.

I changed the above about a month ago and have had no issues since. Itmay be a coincidence, but it appears to be resolved it for me.


At any rate... I'm a happy camper!! I hope this helps other people too.
To verify ... what happens when you go back to the old settings? Do the problems reoccur?
lennardw
Newbie
Newbie
Posts: 23
Joined: July 10th, 2010, 4:32 am

Re: High Memory Usage / Potential Memory Leaks Investigation

Post by lennardw »

sander wrote:To verify ... what happens when you go back to the old settings? Do the problems reoccur?
Let me get back to you on that one.... I'll change it back. But it may take some time for me to verify, as it did not occur 'all the time' (that's what was mostly annoying :) )
lennardw
Newbie
Newbie
Posts: 23
Joined: July 10th, 2010, 4:32 am

Re: High Memory Usage / Potential Memory Leaks Investigation

Post by lennardw »

sander wrote:To verify ... what happens when you go back to the old settings? Do the problems reoccur?
Hi,

On a first glance, the issues seem to return. My Virtual Machine has about 1500MB RAM. When I start off with the process keeps using more and more memory, even when it's not doing anything.

I have changed it back (after SAB crashed due to lack of memory according to my system, overnight). Last time I checked the process was using about 900MB Resident memory. Currently the process is 'only' using 405MB Resident memory (and 1167MB Virtual memory, in case you care), and has been stable for quite some time now.

I hope this helps.

Kind regards,
Lennard



My current installation/environment is as such:

Installation/configuration

Code: Select all

Running as user:    sabnzbd (homedir is /opt/sabnzbd)
SAB installed at:   /opt/sabnzbd/SABnzbd-0.7.0Beta6
Downloads go to:    /opt/sabnzbd/.sabnzbd/downloads/complete
Incomplete dir is:  /opt/sabnzbd/.sabnzbd/downloads/incomplete

There is a symbolic link called /opt/sabnzbd/sabnzbd pointing to /opt/sabnzbd/SABnzbd-0.7.0Beta6 for easier updating
Relevant Filesystems

Code: Select all

/Downloads/newsbin/complete   is a NFS-mount to my NAS
/Downloads/newsbin/incomplete is a dedicated filesystem on local disks (ext4)
Current working situation:

Code: Select all

/opt/sabnzbd/.sabnzbd/downloads/complete   is a symbolic link to /Downloads/newsbin/complete
/opt/sabnzbd/.sabnzbd/downloads/incomplete is a symbolic link to /Downloads/newsbin/incomplete/incomplete
Old not-working situation:

Code: Select all

/opt/sabnzbd/.sabnzbd/downloads/incomplete is a symbolic link to /Downloads/newsbin/incomplete
Gigahertz21
Newbie
Newbie
Posts: 24
Joined: June 19th, 2011, 3:27 am

Re: High Memory Usage / Potential Memory Leaks Investigation

Post by Gigahertz21 »

I just upgraded to the new version of sab last night and downloaded some things over night, when I woke up and it said my system didn't have enough memory or something like that. I'll have to see if Sab does it again.
ZyntaX
Newbie
Newbie
Posts: 1
Joined: July 13th, 2012, 6:23 pm

Re: High Memory Usage / Potential Memory Leaks Investigation

Post by ZyntaX »

I also have this problem and have had it before on two sab installs, never understood the reason for slowdown though.
Running Ubuntu 11.10. Sabnzbd 0.7.1
It only happens on large downloads for me also. Last one is 33GB with 198mb rars.
Restart sabnzbd doesn't release memory, if i reboot and download a "regular" 1080p mkv with 99mb rars it's ok.
Immediately when next large nzb starts downloading the memory consumption rises and maxes out and download speed goes down to pending through a few kb/s upp to 1/3 of my bandwith and down again in a cycle.
I have tried different cache sizes (running 64mb at the moment) and no change.
Post Reply