Server connection limit problem

Get help, report and discuss bugs.
emieln
Posts: 10
Joined: 26 Jan 2009, 22:52

Server connection limit problem

Post by emieln » 22 Jan 2009, 18:29

It seems that nzbget sometimes goes over the maximum allowed number of connections:
ERROR Authorization for <server> failed (Answer: 400 <server>: Your per-user connection limit reached)

Downloading new posts works great, but on older posts these errors sometimes pop up. It seems to me that these errors start to show as soon as a single part fails to download, and then they keep on coming until nzbget is closed. When nzbget is restarted with the same files in the queue, it almost immediately starts producing more of these errors, but when the queue is emptied and a new (more recent) nzb file is loaded, it works ok again.

Also, when these errors do occur, it would be nice if nzbget was somewhat less aggressive in retrying. At one point I think I may have been banned from the news server temporarily when the error was replaced with "502 Access denied to your node". But that might have been something unrelated.

For what it's worth, the most recent download that caused these errors was The.X.Factor.S05E11.WS.PDTV.XviD-FTP from a.b.multimedia with an nzb file from nzbsearch.info.

emieln
Posts: 10
Joined: 26 Jan 2009, 22:52

Re: Server connection limit problem

Post by emieln » 22 Jan 2009, 18:33

I forgot to mention this happens with both nzbget version 0.5.0-testing and 0.6.0-testing (from current svn trunk), on Debian GNU/Linux "sid".

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Server connection limit problem

Post by hugbug » 22 Jan 2009, 18:48

What newsserver you are using?

emieln
Posts: 10
Joined: 26 Jan 2009, 22:52

Re: Server connection limit problem

Post by emieln » 22 Jan 2009, 20:15

Currently I am using news.hitnews.eu (http://www.hitnews.eu/). Before that I was using news.smsusenet.nl (http://www.smsusenet.nl/). The same problem happens with both.

emieln
Posts: 10
Joined: 26 Jan 2009, 22:52

Re: Server connection limit problem

Post by emieln » 22 Jan 2009, 22:48

I just downloaded the whole release from the same nzb on the same news server using the Pan newsreader, without any errors whatsoever. Afterwards I tried to load that same nzb again into nzbget, and as soon as nzbget started downloading it, it gave me more connection limit errors. (this was a while after I closed Pan and they were never running at the same time). This time, these connection limit errors weren't preceded by any failed part errors, although there was a different sort of failed part error directly afterwards. All required parts are fine on the news server though. If I lower the number of allowed connections from 8 to 4 in the config, it *still* gives those connection-limit errors.

Thu Jan 22 23:36:29 2009 INFO Collection the x factor s05e11.nzb found
Thu Jan 22 23:36:29 2009 INFO Collection the x factor s05e11.nzb added to queue
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [1/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [5/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [7/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [6/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [2/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [8/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 ERROR Authorization for ssl.hitnews.eu failed (Answer: 400 news.hitnews.eu: Your per-user connection limit reached - support(at)support.hitnews.eu)
Thu Jan 22 23:36:30 2009 WARNING Article the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [2/44] @ ssl.hitnews.eu failed, could not join group: Connection closed by remote host
Thu Jan 22 23:36:30 2009 DETAIL Waiting 10 sec to retry
Thu Jan 22 23:36:30 2009 ERROR Authorization for ssl.hitnews.eu failed (Answer: 400 news.hitnews.eu: Your per-user connection limit reached - support(at)support.hitnews.eu)
Thu Jan 22 23:36:30 2009 WARNING Article the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [8/44] @ ssl.hitnews.eu failed, could not join group: Connection closed by remote host
Thu Jan 22 23:36:30 2009 DETAIL Waiting 10 sec to retry
Thu Jan 22 23:36:30 2009 WARNING Download the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [1/44] failed
Thu Jan 22 23:36:30 2009 WARNING Download the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [6/44] failed
Thu Jan 22 23:36:30 2009 WARNING Download the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [5/44] failed
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [9/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [10/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 WARNING Download the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [7/44] failed
Thu Jan 22 23:36:30 2009 DETAIL Downloading the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [11/44] @ ssl.hitnews.eu
Thu Jan 22 23:36:30 2009 ERROR Authorization for ssl.hitnews.eu failed (Answer: 400 news.hitnews.eu: Your per-user connection limit reached - support(at)support.hitnews.eu)
Thu Jan 22 23:36:30 2009 WARNING Article the x factor s05e11/The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part36.rar [10/44] @ ssl.hitnews.eu failed, could not join group: Connection closed by remote host
Thu Jan 22 23:36:30 2009 DETAIL Waiting 10 sec to retry

etc.

emieln
Posts: 10
Joined: 26 Jan 2009, 22:52

Re: Server connection limit problem

Post by emieln » 22 Jan 2009, 23:12

Ok, I just found out that even though pan successfully downloaded the whole release, it really messed up the way in which it was saved. Every file was saved in about 44 separate parts, named like this: The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part01.rar, The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part01_copy_2.rar, ..., The.X.Factor.S05E11.WS.PDTV.XviD-FTP.part01_copy_44.rar. Concatenating all of these parts in the right order successfully completes the files. This normally doesn't happen with pan as far as I know, so it may be caused by a bad nzb file. It still shouldn't cause nzbget to go over the connection limit though. I wonder if all those other errors I've had were also caused by the nzb files. I am not sure whether these are two separate problems or just one.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Server connection limit problem

Post by hugbug » 23 Jan 2009, 09:32

I have an idea what can possible cause the problem.

If nzbget fails to download an article (due any error like "connection closed" or "article not found") it always reconnects. That means it closes connection and immediately connects to server again. Usenet providers have many computers, but authorization is handled by only one (I think so). When a client disconnects, a server, it was connected to, tells the authorization server about that fact.
May be the server doesn't handle that properly.

A workaround could be to add some safety delay during reconnect. I'll make a test patch for you.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Server connection limit problem

Post by hugbug » 23 Jan 2009, 16:36

Here is the patch. It makes a pause between colsing the connection and establishing new connection.
The fefault pause is 1000 ms (1 second). Try different values for constant "CONNECTION_RECONNECT_TIMEOUT" declared in "NNTPConnection.cpp".
If the patch works I'll create a new option for config file.
Attachments
reconnect_timeout_test1.patch.gz
(661 Bytes) Downloaded 304 times

emieln
Posts: 10
Joined: 26 Jan 2009, 22:52

Re: Server connection limit problem

Post by emieln » 26 Jan 2009, 11:35

Thanks for the patch. Unfortunately it doesn't fix the problem. I added #include <unistd.h> to NNTPConnection.cpp in order to make it compile, and set the timeout to 5000 ms. This causes nzbget to wait a bit longer after the first failed downloads but it still prints the user-limit errors after that. Does that specific nzb file work for you on your news server? Because I know the articles are there on my newsserver, pan downloaded all of them, but for some reason nzbget can't.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: Server connection limit problem

Post by hugbug » 26 Jan 2009, 12:18

I tested the file with my newsserver (astraweb) and it worked well. But my newsserver has over 120 days retention and the file is only about 105 days old.
I tested with another very old post to provoke "article not found" errors, but never had connection limit error.

Could it be that you defined two (same) newsservers in config file?

If you could give me your config-file with your login data I could possibly reproduce/fix the problem. If you decide to do that, sent the file to my e-mail address at hugbug@public-files.de.

Post Reply

Who is online

Users browsing this forum: No registered users and 50 guests