🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #161914

Re: XNEWS - possible bug with socket connections to NNTP server

#161914
From: Brian Kraft
Date: Thu, 03 Feb 2005 18:43
45 lines
3487 bytes
Wanderer wrote:

>After careful analysis of my problems dealing with a heavily loaded 
>(overloaded) news server.  Here is what has been happening.  Xnews 
>establishes a connection. (Per article it appears) this appears to be a 
>BLOCKING CONNECTION (these are very bad I've learned in my many years of 
>twiddling internet stuff).  At this point XNEWS possibly uses an internal 
>timer to decide if the connection has timed out, It then tries to connect 
>again, then it times out again.  This creates 2 connections to a bogged 
>down server, in my case that's the limit so I get message 400 returned 
>"Sorry we aren't letting you connect again".

You can try to connect again, but if the server is still full you'll
get another 400.  Depending on time of day and week, and how the
server is configured, the number of 400's in a row that you'll see
might be anywhere from 2 or 3, to several hundred.

>Erstwhile the connections that it did attempt to make are STILL THERE, 
>waiting to recieve data in the OS.  This could be an OS problem.  It is one 
>reason why I set all my sockets non blocking.  I've had this deranged 
>behavior happen before but not with windows (Embeded DOS actually with a 
>nice TCP/IP stack). The end result is a 400 message for a LONG time from 
>the server. Why? Because I think there was a lack of properly disconnecting 
>the socket.  The server thinks I'm still connected LONG LONG after I've 
>disconnected.  So now there are 2 dead sockets on the server that have my 
>name on it. And thus the server is busy until it decides to disconnect 
>those sockets and let me try and connect again.  Even if windows times out 
>those sockets, they are likely still there. This is kind of bad news for me 
>in remaining connected to the news server for more than 40 seconds per 15 
>minutes.

If the server sees 3 open connections from your host, and you try to
open more, you'll start getting different responses from the server.

There are 4 different NNTP connection responses from this server:
201 [...] (connection accepted)
400 [...] (server's connection limit reached)
400 [...] (your host's connection limit reached)
502 [...] (no access from your host)

One of the reasons why I never used Xnews is I can't even log these.  
How can you debug when you can't see which kind of 400 you get?

Other clients can connect easily and use the server continuously and
automatically so you don't notice that there are any restrictions.
Technical Details
Message-ID: <20050203134143.413$gu@news.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.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!tango.newsreader.com!not-for-mail
References: <Xns95EFE4CEBAF79Z23AXNZADEF2UFS@69.28.186.121>

Show Full Headers
Complete Article Headers
Message-ID: <20050203134143.413$gu@news.newsreader.com>
Subject: Re: XNEWS - possible bug with socket connections to NNTP server
Date: Thu, 03 Feb 2005 18:43:35 +0000
From: Brian Kraft <bkraft@nyx.net>
References: <Xns95EFE4CEBAF79Z23AXNZADEF2UFS@69.28.186.121>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!tango.newsreader.com!not-for-mail
Newsgroups: news.software.readers
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: tango.newsreader.com xY/J4NKqxH_GP,YrH+bApc04BPZOYE5p7GFbNU2h/g7iuN6
Lines: 45