Page 1 of 1

SABnzbd not closing connections..

Posted: October 24th, 2010, 2:30 am
by JPL4
After many frustrating weeks of Sab closing itself down on my QNAP 509 I finally decided to get to the bottom of what was going on. Initially I thought it would be a simple fix maybe an update, reinstall, qnap firmware but this hole kept going and here is what I've got.

Sab seemed to shut down at random. This would happen in the paused state on a daily basis with no apparent reasons. Looking in the Sab errlog I found a errno 24 "too many files open". After googling this it seemed to be a Ubuntu os issue as (i think in this forum) someone pointed out. Being unfamiliar with linux I searched on and found that I could list my open files using ssh lsof in hopes that it would explain where all these files may be coming from. Had to install OptiPKG (QNAP).. What I found had little to do with the OS and much to do with Sab itself. Hundreds of CLOSE_WAIT connections: SABnzbd.p  5040 admin  848u    IPv4      47138      0t0        TCP STRA-QNAP:****->h91.131.***.***.static.ip.windstream.net:63456 (CLOSE_WAIT)

I then did a netstat -n and once again a wall of tcp local address --> foreign address STATE: (CLOSE_WAIT)

I dont know what changed. I have been using Sabnzbd on this box for almost 2 years without error. Why would Sab not be terminating my connections? Please Help..

Re: SABnzbd not closing connections..

Posted: October 24th, 2010, 2:54 pm
by shypike
I'm not aware of any changes in socket handling that explain this.
Since which release do you notice this.
Were there any changes in the operating system, Python etc. ?
Any idea if the socket are from the internal webserver or the Usenet servers?
How is "Config->Switches->Disconnect on empty queue" set?
Do you see many disconnect warnings?

Re: SABnzbd not closing connections..

Posted: November 8th, 2010, 6:01 pm
by JPL4
The connections I was seeing was to my office.. SABconnect chrome extension seemed to be holding on but still SAB couldnt shut them down. ended up disabling all the options in my Bonjour tab under Network Discovery Services in the QNAP admin GUI.. All is good again..