🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80595

Re: basic nntp connections question

#80595
From: tanderson
Date: Fri, 17 Apr 2009 21:52
49 lines
4441 bytes
Curt Welch wrote:

> tanderson <holden@mcgroyn.com> wrote:
>> I am fooling around writing a newsreader and have some of the basics in
>> place. My question is about every 10 connections or so I will get
>> rejected with a 502 upon doing the authinfo. I know everything is valid
>> and I am not maxing out the connections. I have noticed through the years
>> newsreaders having a number of retries setting. So I am guessing that
>> this behavior is normal and I just need to retry the login?
> 
> It's not "normal" technically.  If your news server is randomly rejecting
> connections about 1 out of 10 times, it's a broken news server.  Our
> servers are broken in similar ways at times. :)  However,  my first guess
> would be that your client code is doing something wrong.
> 
> Most news servers have per user connection limits, and it's possible,
> depending on how the server implements that limit, that your closed
> connections might still be counting against the limit for some period of
> time (a few seconds, or a few minutes?).  So, if you are opening and
> closing a lot of connections, instead of opening one (or a few), and
> keeping it open for the long term, you might be creating problems for
> yourself by confusing the server's connection limit counting.  That's just
> a guess.  But normally, NNTP is not like HTTP.  News servers don't expect
> you to open and close connections 100 times a second.  Historically, the
> typical usage is to open a connection when the user starts his newsreader,
> and leave it open until he's done.  It's perfectly fine to dynamically
> open more as needed, but in general, you might run into some problems if
> you are constantly opening and closing new connections quickly.
> 
> However, there are lots of broken news servers around, and as such, it is
> normal to add code to the client side to automatically retry connections
> when they don't work, or to automatically try to re-connect if you get
> disconnected.  You have to be careful however not to put the client and
> server into a tight infinite loop when you start adding automatic retry
> code.  You have to put retry limits, and should use some automatic
> back-off algorithm to make it delay longer between consecutive failed
> retry
> attempts.  If the account is blocked on the server side, you don't want
> the client to go into a tight infinite loop trying 100 times per second to
> connect while constantly being rejected.
> 
> So it's possible that the server you are using is just broken and does
> reject connections about 1 out of 10 times, but it shouldn't do that, so
> check your code carefully to make sure the server really is doing what you
> think it's doing, but then, do whatever you have to in your code, to make
> it work with the server you are using.
> 

thanks so much for all the info.
Technical Details
Message-ID: <n-ednbSTmLvnZHXUnZ2dnUVZ_hidnZ2d@giganews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!feeder2-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
References: <gdydnR0nDbBlYXrUnZ2dnUVZ_tKdnZ2d@giganews.com> <20090417132501.794$OL@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <n-ednbSTmLvnZHXUnZ2dnUVZ_hidnZ2d@giganews.com>
Subject: Re: basic nntp connections question
Date: Fri, 17 Apr 2009 17:52:04 -0400
From: tanderson <holden@mcgroyn.com>
References: <gdydnR0nDbBlYXrUnZ2dnUVZ_tKdnZ2d@giganews.com> <20090417132501.794$OL@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!feeder2-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 17 Apr 2009 16:49:46 -0500
Newsgroups: news.software.nntp
User-Agent: KNode/0.10.9
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Lines: 49
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-qrfhA9F2ET2NFp3tXmJW0qicI428b3rhZvCZSf4btZnOddYr7o07bTHXNrCd+ZnTBQg0c7tnsfS3XE5!TgsyD3KKGpPsCbxxngt3VNDI1ctSyE2BZEYi3IJyEakWOSHwE72u9uf2f3Tbm+NKq6sodpMldvQ=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint
 properly
X-Postfilter: 1.3.39
X-Original-Bytes: 3998