Too many connections to server

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.
xtrips
Jr. Member
Jr. Member
Posts: 52
Joined: May 11th, 2010, 5:45 am

Too many connections to server

Post 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
User avatar
inpheaux
Administrator
Administrator
Posts: 563
Joined: January 16th, 2008, 9:14 pm

Re: Too many connections to server

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Too many connections to server

Post 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.
Marcel
Newbie
Newbie
Posts: 9
Joined: May 12th, 2010, 5:47 pm

Re: Too many connections to server

Post 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
Last edited by Marcel on May 12th, 2010, 5:59 pm, edited 1 time in total.
echofx
Newbie
Newbie
Posts: 14
Joined: August 31st, 2009, 4:44 pm

Re: Too many connections to server

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Too many connections to server

Post 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.
echofx
Newbie
Newbie
Posts: 14
Joined: August 31st, 2009, 4:44 pm

Re: Too many connections to server

Post 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.
Marcel
Newbie
Newbie
Posts: 9
Joined: May 12th, 2010, 5:47 pm

Re: Too many connections to server

Post 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.
robdeep
Newbie
Newbie
Posts: 8
Joined: February 27th, 2010, 5:43 pm

Re: Too many connections to server

Post 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.
ErikBrown
Release Testers
Release Testers
Posts: 118
Joined: December 20th, 2009, 1:25 am
Location: Home

Re: Too many connections to server

Post 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
Last edited by ErikBrown on June 19th, 2010, 5:20 am, edited 1 time in total.
gavinlew
Newbie
Newbie
Posts: 1
Joined: July 28th, 2010, 8:18 am

Re: Too many connections to server

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Too many connections to server

Post 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.
orangeboy
Newbie
Newbie
Posts: 18
Joined: November 28th, 2008, 2:17 pm

Re: Too many connections to server

Post 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
Last edited by orangeboy on September 12th, 2010, 8:27 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Too many connections to server

Post 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).
Gfy
Newbie
Newbie
Posts: 13
Joined: July 10th, 2010, 9:03 am
Location: Belgium
Contact:

Re: Too many connections to server

Post 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!
Last edited by Gfy on September 16th, 2010, 11:08 am, edited 1 time in total.
Post Reply