Page 1 of 2

Too many connections to server

Posted: May 12th, 2010, 3:31 am
by xtrips
Hello,

Although I am allowed 60 concurrent connections Sabnzbd frequently gives me errors about "Too many connections to server". Apart from that all works fine.
Other usenet browsers I use don't have this problem.
Just FYI, I am using SSL on port 443. Port 563 is rejected by Sabnzbd.

Thanks

Re: Too many connections to server

Posted: May 12th, 2010, 3:56 am
by inpheaux
We just relay whatever errors the host sends us. If they're saying you're using too many connections then you're using too many connections. Turn down your connection count.

You shouldn't need 60 connections to saturate your downstream anyway. So it's not like setting the connection count lower is going to reduce your overall speed.

Re: Too many connections to server

Posted: May 12th, 2010, 3:58 am
by shypike
Which port is acceptable is determined by the Usenet server, not by SABnzbd.

Most providers advise you to stay below the maximum, because it's inevitable that
some connections timeout and most servers are rather slow in recognizing dead connections.
Also don't be fooled by the marketing department of Usenet sellers.
There's no point in using 60 connections.
Just set the number to 30 and it's very likely that you'll see no difference in performance,
even an improvement is possible.

Re: Too many connections to server

Posted: May 12th, 2010, 5:54 pm
by Marcel
Hi,


I'm getting the same error. But the worst part is that sabnzbd don't try to connect again when get this error.
So my total number of conections drops util reach ZERO and the download stops.
I need to reset sab to get it to reconect to all ports.

Thanks,


Marcel Costa






Version: 0.5.2 final
OS: Win 7 64bits
Install-type: Windows Installer
Skin: Plush.
Firewall Software: Win 7 firewall
Are you using IPV6? - IPV4
Is the issue reproducible? Yes

Re: Too many connections to server

Posted: May 13th, 2010, 12:33 am
by echofx
I'm also seeing this issue. Same version, also on Win7 x64. It's happened to me three times now. Only way to fix it is to restart sabnzbd.

Re: Too many connections to server

Posted: May 13th, 2010, 3:54 am
by shypike
What happens if you pause, wait 10 seconds and then resume?
How is the option "Disconnect on empty queue" in Config->Switches set?
If "on" all connections will be terminated when pausing or when the queue is empty.
For most servers this is the best setting.
However some servers seem to have difficulty with this, so they
are better off with the "off" setting.

Re: Too many connections to server

Posted: May 13th, 2010, 7:26 am
by echofx
Set to 'on' for me. I'm using astraweb. I've never had any problems previous to 0.5.2.

Going under Config->Connections and doing a force disconnect did not help. I remember trying to pause the queue, but not for 10 seconds so if it happens again I can try that.

Re: Too many connections to server

Posted: May 13th, 2010, 8:14 am
by Marcel
I'm using astraweb too.
Disconnect on Empty Queue - ON ( for me)
I already tried to wait for more then 10sec but all the same. Just the connections that were already downloading start again.

Re: Too many connections to server

Posted: June 17th, 2010, 8:55 pm
by robdeep
I too started having this problem with 0.5.2... the other change I made was from a 100mb nice to 1gb nic, but I doubt that would have anything to do with it.

Running XP SP2. Connecting to Supernews with SSL. Tried both ssl ports. It allows for 30, but I had to set SABnzbd to 20 connections to get the "Too Many Connections" error to go away, and even then, it still only maintains 14-19 connections concurrently. Still saturates my link, but it is odd and undesirable behavior.

Re: Too many connections to server

Posted: June 19th, 2010, 5:15 am
by ErikBrown
I also used to have the problem with the reducing number of connections with 052 final. But 053 RC1 has solved it for me.

Erik

Re: Too many connections to server

Posted: July 28th, 2010, 8:21 am
by gavinlew
Hi ,

I am seeing this behavior using 0.53 and Astraweb , I have 20 connections set (which I am allowed), yet downloading starts then the warnings screen fills up with maximum connections exceeded.

I have tried SSL and non SSL connections to Astraweb.

I have the Options -> Switches -> Disconnect on Empty Queue: turned On.

Using another Usenet provider I do not experience this problem.

Re: Too many connections to server

Posted: July 28th, 2010, 4:31 pm
by shypike
Servers often have difficulty in seeing closed connections.
There's no need to use the maximum amount of connections.
Just use the minimum that gives you the highest speed.
You can ignore the warnings, SABnzbd will scale back the number of used connections.
Later releases will less warny when warnings are not useful.

Re: Too many connections to server

Posted: September 12th, 2010, 8:24 am
by orangeboy
shypike wrote: Servers often have difficulty in seeing closed connections.
There's no need to use the maximum amount of connections.
Just use the minimum that gives you the highest speed.
You can ignore the warnings, SABnzbd will scale back the number of used connections.
Later releases will less warny when warnings are not useful.
I too suffer from "Too many connections to server" problems. My ISP (RoadRunner) has a pretty good service (good retention, fairly complete using newshosting.com), but RR caps the number of connections to 4, and I get about 500KB/s when all 4 connections are humming. So in my case, I do have a need to use the max amount of connections offered. Just like SABnzbd scaling back the number of connections, couldn't SABnzbd scale up the number of connections after a fixed amount of time, allowing connection states of "FIN_WAIT_2" or "TIME_WAIT" to timeout and recover?

To address the symptoms, I'm toying with this windows batch that uses cURL and SLEEP to check the status of SABnzbd every 15 minutes, and try to recoup the missing connections:

Code: Select all

@ECHO OFF&CLS
SETLOCAL ENABLEDELAYEDEXPANSION
TITLE %~n0

SET host_address=192.168.0.30
SET base_url=http://%host_address%:8082

:Check
SET /A thread_count=0
FOR /F "tokens=2 delims=/^>" %%a IN ('cURL -s "%base_url%/"^|FINDSTR /I "Pause"') DO (
    SET suspend_link=%%a
)
FOR /F "tokens=* delims=" %%a IN ('cURL -s "%base_url%/connections/"^|FINDSTR /I "Thread"') DO (
    SET /A thread_count+=1
)
FOR /F "tokens=5" %%a IN ('cURL -s "%base_url%/connections/"^|FINDSTR /I "<title>"') DO (
    SET queued=%%a
)
:Assess
IF /I %thread_count% EQU 0 (
    IF /I %queued% GTR 0 (
        >NUL cURL -s "%base_url%/%suspend_link%
        FOR /f "tokens=5" %%a IN ('netstat -ano^|FIND ":8082      0.0.0.0:0"') DO (
            >NUL NET SEND /DOMAIN:DOMAIN SABnzbd - Too Many Connections. Queued: %queued%.
            TASKKILL /F /PID %%a
        )
        START "" "C:\Program Files\SABnzbd\SABnzbd.exe" -b0
    )
)

:Show
ECHO Time is: %time%, Connections: %thread_count%, Queued: %queued%
SLEEP 900
GOTO Check

Re: Too many connections to server

Posted: September 12th, 2010, 10:08 am
by shypike
You can set the amount of connections higher than allowed.
SABnzbd will scale back and try the full amount later (after about 10 mins).

Re: Too many connections to server

Posted: September 16th, 2010, 10:27 am
by Gfy
shypike wrote: Servers often have difficulty in seeing closed connections.
There's no need to use the maximum amount of connections.
Just use the minimum that gives you the highest speed.
All true. The downloading stops because there are as many ghost connections as threads you are allowed to use. After a timeout at the server's side, there should become new connections available.
So, when this happens, I assume sabnzbd starts downloading again after a couple of minutes, depending on the server.

If you wait an hour without doing anything, are the downloads started again, even if it's starting slow and possibly stopping again? If not, then it's a bug in sabnzbd.

If I download from my isp's newsserver, I reach my full bandwidth with 2 connections. I think using 60 is cray! I find it hard to believe you have an extremely bad newsserver that this number is needed to get decent speeds. I know Pan (a Linux usenet reader) has a hard limit of 4 connections per server build in!
The more connections you use that aren't necessary, will cause some performance loss for you and the server.

shypike, it seems a lot of people don't know this. I think a little explanation at the top in the gui can be useful. (or the wiki help)
Something else that can make the gui more user friendly: fill in 119 for the port by default. (I know this is chosen if left empty, but that's not user friendly) Make the port change automatically to 563 if the value is still 119. This is easily accomplished with a couple of javascript lines, but makes it a lot better for the casual user!