🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #61516

Re: Problems with LIST ACTIVE Closing Connection

#61516
From: Curt Welch
Date: Sat, 13 May 2000 00:00
98 lines
5944 bytes
Nick Knight <nick@secant.com> wrote:
> Hi.
>
> I've had a nagging, sporadic problem with my code that collects the list
> of active news groups.  I'll try to describe it briefly, but some detail
> is required.  I'm looking for better/different ways to acquire a COMPLETE
> list of available newsgroups.
>
> On newsservers with LARGE lists, there seems to be (sometimes?) a
> tendency for the newsserver to close the connection, without any
> code/message either before any of the list is sent, or shortly after it
> starts.

No, it's not the news server that decides to close that connecion.  That
will never happen unless it's set to time out and you stop reading for
the time-out period (which is normally 5 minutes or more).

> I am experiencing this myself (but am more worried about other-user
> reports).  When at work, over a full T1 connection and fast local
> network, LIST ACTIVE returns a complete list dependably, over and over
> again. Using dial-up (with work as the provider), I get disconnected
> after receiving a very small portion of the list.  However, on occassion,
> the list will come across fine!
>
> I have tried various mutations of this logic.  My current code walks
> through the alphabet and gets LIST ACTIVE for a*, b*, etc., making
> provisions for non-alphabetic starts.

Ugh.  Stop it.  Stop it now.

LIST ACTIVE will _NEVER_ fail like that.  You never ever need to
to play games like that to reduce the size of the output from the
NNTP server.

Your problem has nothing to do with NNTP or the NNTP server or your
application.

Your problem is your internet connection.  Stop hacking your application
and fix your dial-up connection.

Is this a dial-up server provided from your work instead of from a "real"
ISP?  I suspect it's set up wrong.  Whoever configured your dial-in modems
probably did it wrong.  I'm assuming it's the dial-in side and not your
modem since you said other people were having the same problem.  (Are they
all using the same number to dial into?)  Plus, the problem as you describe
it I think would only happen if the modems on the upstream side of the data
flow were the ones set up wrong.

It sounds to me like a flow control problem.  i.e, you don't have flow
control set up, or it's set up incorrectly.

What happens is this. When you send the LIST ACTIVE command, and the server
starts sending the response.  TCP/IP has flow control - but the amount of
data it will send before stoping is limited by the window size of the
connection - and that can be very large - 65K for example.  So the server
will end up trying to send that much data to the modem before it stops.

The connection between the terminal server and them modem may well be at a
very high rate - say 115k or whatever.  But the modem connection speed will
vary depending on the connection and the speed of the user modem etc.  If
the modem is running at 28K over the phone line, and the serial connection
between the terminal server and the dial-in modem is higher, then the modem
has to be able to tell the terminal server to stop sending data.  That's
what flow control is for.  If it can't, the terminal server will just dump
all the data (the 65K TCP/IP window full of data) to the modem.  But
because the modem can't hold all that, it just throws it away.  All expect
they first small chunk which makes it to you ok.  TCP will try to ack the
data you got, but depending on what's happening, it may not get though
correctly - or for example, if the modem is sending ^S ^Q as flow control
when the terminal server isn't expecting it, that could be corrupting your
ack packets going back.  So after a short period, the TCP code closes the
connection because it's unable to talk correctly to your other end.

All this only happens when the fast side (the server), needs to dump a lot
of data.  For small files, this problem will never been seen.  That's why
the dial-in modems can "seem" to work correctly when in fact that are all
fucked up.

You can probaly produce the same errors just by trying to ftp a large file
from the server down to your client for exmaple.

The TCP window size might be affected by the size of the read buffer you
are using in your application.  Making the buffer smaller might actually
fix the problem (like 500 bytes or 1K).  If the TCP window size is smaller
than the buffer in your modem, then the problem won't bite you because the
server will never be trying to send more data than the modem can hold
(without flow control).  But if that does fix it, it just proves you have a
flow control problem because the modems aren't configured correctly.

The problem could be caused by how your modem is set up instead - but then
that doesn't explain why others would see the same error.  And the symptoms
you report seem to better fit a problem with the other end.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <20000512204628.625$Tz@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <391c1c8e$3$avpx$mr2ice@client.ce.news.psi.net>

Show Full Headers
Complete Article Headers
Message-ID: <20000512204628.625$Tz@newsreader.com>
Subject: Re: Problems with LIST ACTIVE Closing Connection
Date: Sat, 13 May 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <391c1c8e$3$avpx$mr2ice@client.ce.news.psi.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 622777758
X-User: Curt@NewsReader.Com
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Newsgroups: alt.usenet.offline-reader,news.software.readers