🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
10 messages
10 total messages Started by Florian Zschocke Sat, 22 May 2004 18:48
nntp 503 server timeout
#69214
Author: Florian Zschocke
Date: Sat, 22 May 2004 18:48
10 lines
1304 bytes
Hello N

Is there any rule about the way a nntp-server has to close a connection after timeout 
On my experience the most server just hang up. Only on one server ( out of four ) I get a 503
timeout response.
Is there a way to ask the server about the timeout 

Thank you for your time and help 

Florian
Re: nntp 503 server timeout
#69216
Author: Jeffrey M. Vinocur
Date: Sat, 22 May 2004 19:10
41 lines
2628 bytes
In article <40afa061$0$26354$9b4e6d93@newsread4.arcor-online.net>,
Florian Zschocke  <edv@zschocke-berlin.de> wrote:
>
>Is there any rule about the way a nntp-server has to close a connection
>after timeout ?

The latest revision of the draft NNTP specification says:

   An NNTP server MAY have an inactivity autologout timer. Such a timer
   SHOULD be of at least three minutes duration, with the exception that
   there MAY be a shorter limit on how long the server is willing to
   wait for the first command from the client. The receipt of any
   command from the client during the timer interval SHOULD suffice to
   reset the autologout timer. Similarly, the receipt of any significant
   amount of data from the client while in the midst of sending a
   multi-line message to the server (such as during a POST or IHAVE
   command) SHOULD suffice to reset the autologout timer. When the timer
   expires, the server SHOULD close the TCP connection without sending
   any response to the client.


>On my experience the most server just hang up. Only on one server ( out
>of four ) I get a 503 timeout response. 

By the above standard-to-be, the server with the response is
incorrect.


>Is there a way to ask the server about the timeout ?

No.

I suppose someone could write an extension for determining the
timeout, although I'm not sure server authors would want to
support it, seeing as the only reason to check the timeout is
presumably to circumvent it...


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: nntp 503 server timeout
#69217
Author: Bill Davidsen
Date: Sun, 23 May 2004 15:17
67 lines
4370 bytes
Jeffrey M. Vinocur wrote:
> In article <40afa061$0$26354$9b4e6d93@newsread4.arcor-online.net>,
> Florian Zschocke  <edv@zschocke-berlin.de> wrote:
> 
>>Is there any rule about the way a nntp-server has to close a connection
>>after timeout ?
> 
> 
> The latest revision of the draft NNTP specification says:
> 
>    An NNTP server MAY have an inactivity autologout timer. Such a timer
>    SHOULD be of at least three minutes duration, with the exception that
>    there MAY be a shorter limit on how long the server is willing to
>    wait for the first command from the client. The receipt of any
>    command from the client during the timer interval SHOULD suffice to
>    reset the autologout timer. Similarly, the receipt of any significant
>    amount of data from the client while in the midst of sending a
>    multi-line message to the server (such as during a POST or IHAVE
>    command) SHOULD suffice to reset the autologout timer. When the timer
>    expires, the server SHOULD close the TCP connection without sending
>    any response to the client.
> 
> 
> 
>>On my experience the most server just hang up. Only on one server ( out
>>of four ) I get a 503 timeout response. 
> 
> 
> By the above standard-to-be, the server with the response is
> incorrect.

I have no idea what anyone was thinking... Other than confuse users and 
generate traffic for whatever passes for a call center, not telling the 
user why the socket dropped has no visible benefit. If the user really 
wants to know the timeout s/he can just connect and see how long it 
takes to close. If the user has one of the clients which opens several 
sockets, it's useful to the client (software) and user (human) to know 
what's happening.
> 
> 
> 
>>Is there a way to ask the server about the timeout ?
> 
> 
> No.
> 
> I suppose someone could write an extension for determining the
> timeout, although I'm not sure server authors would want to
> support it, seeing as the only reason to check the timeout is
> presumably to circumvent it...

Since it's very easy to keep the socket alive, anyone who thinks that 
hiding information is in some way protecting the server is going to have 
a benefit greater than the piss-me-off factor is working with users 
other than those I've seen.

As a matter of experience, long timeouts are more effective, although 
that's not obvious. If the timeout is short a greater number of users 
will use some form of faking use. If it's reasonable, say an hour, it 
bites less often and users are less likely to take action which makes 
the timeout completely ineffective.

-- 
bill davidsen (davidsen@darkstar.prodigy.com)
   SBC/Prodigy Yorktown Heights NY data center
   Project Leader, USENET news
   http://newsgroups.news.prodigy.com
Re: nntp 503 server timeout
#69220
Author: Jeffrey M. Vinocur
Date: Mon, 24 May 2004 22:58
72 lines
4140 bytes
In article <ng3sc.965$FC3.272@newssvr16.news.prodigy.com>,
Bill Davidsen  <davidsen@deathstar.prodigy.com> wrote:
>Jeffrey M. Vinocur wrote:
>> In article <40afa061$0$26354$9b4e6d93@newsread4.arcor-online.net>,
>> Florian Zschocke  <edv@zschocke-berlin.de> wrote:
>> 
>>>On my experience the most server just hang up. Only on one server ( out
>>>of four ) I get a 503 timeout response. 
>> 
>> By the above standard-to-be, the server with the response is
>> incorrect.
>
>I have no idea what anyone was thinking...

Well, there's an underlying principle, which is that the
server can't just send a response line out of the blue.  For
example, the server that sends 503 for a timeout would really
confuse a client that had *just* sent off some command (but the
command and the 503 timeout crossed each other on the network).

Note that other protocols have the same behavior; a transport
layer close to the connection is all that indicates a timeout.
(For HTTP/1.1 persistent connections, for example, see section
8.1.4 of RFC 2616.)


>>>Is there a way to ask the server about the timeout ?
>> 
>> No.
>> 
>> I suppose someone could write an extension for determining the
>> timeout, although I'm not sure server authors would want to
>> support it, seeing as the only reason to check the timeout is
>> presumably to circumvent it...
>
>Since it's very easy to keep the socket alive, anyone who thinks that 
>hiding information is in some way protecting the server is going to have 
>a benefit greater than the piss-me-off factor is working with users 
>other than those I've seen.

As far as I've seen, modern, well-written newsreaders are so good
at masking the timeout issue from users that it's pretty moot.

But as I said, there's nothing stopping anyone who thinks such an
extension would be useful from writing one and submitting it for
publication.  The mere fact that not all servers choose to
support it doesn't mean that it can't be published.


>As a matter of experience, long timeouts are more effective, although 
>that's not obvious. If the timeout is short a greater number of users 
>will use some form of faking use. If it's reasonable, say an hour, it 
>bites less often and users are less likely to take action which makes 
>the timeout completely ineffective.

I think the point is that any client that exposes the timeout to
the user is, well, pretty broken.  I mean, do you have any idea
what sort of timeouts HTTP/1.1 web servers use for persistent
connections?  I certainly don't -- my web browser takes care of
that for me; it keeps the connection as long as it thinks is
necessary, and if the server has closed the connection at some
point when my browser wants data, it just opens up another one.


I'm speaking for myself and off the cuff here, by the way.  Maybe
other working group people will disagree with me...



-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: nntp 503 server timeout
#69221
Author: Russ Allbery
Date: Mon, 24 May 2004 23:24
20 lines
2119 bytes
Bill Davidsen <davidsen@deathstar.prodigy.com> writes:

> I have no idea what anyone was thinking... Other than confuse users and
> generate traffic for whatever passes for a call center, not telling the
> user why the socket dropped has no visible benefit.

You cannot tell the user why the socket was dropped.  NNTP is a stateful
protocol where the server may not send the client information unless the
client has sent a command.  You can get away with it in some cases if it's
the last thing you ever send the client, but it's still inherently broken
to do things that way.

NNTP isn't IMAP.  If one wants unprompted server messages, IMAP is the way
to go.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: nntp 503 server timeout
#69231
Author: Florian Zschocke
Date: Tue, 25 May 2004 22:45
21 lines
2307 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote:
>
>
>I think the point is that any client that exposes the timeout to
>the user is, well, pretty broken.  I mean, do you have any idea
>what sort of timeouts HTTP/1.1 web servers use for persistent
>connections?  I certainly don't -- my web browser takes care of
>that for me; it keeps the connection as long as it thinks is
>necessary, and if the server has closed the connection at some
>point when my browser wants data, it just opens up another one.
>
That is exactly what I want to do. I try to program my newsreader for OSX so, that you 
don't have to worry about the timeout. The problem is, that I just have my empiric 
experience with four different server.  
I have programmed a BSD-like socket connection with a automatic repetition of the 
last command ( when the connection is timed out ). From my point it is totally useless to 
have a server which tells me that he don't want to tell anything more without being 
reconnected. On the other hand I could not find a direct method to check if the connection is still 
good. So my software works well with these four server but I am unsure what is about the rest. 
Florian
Re: nntp 503 server timeout
#69232
Author: Russ Allbery
Date: Tue, 25 May 2004 23:03
28 lines
2270 bytes
Florian Zschocke <edv@zschocke-berlin.de> writes:

> I have programmed a BSD-like socket connection with a automatic
> repetition of the last command ( when the connection is timed out
> ).

Note that that's not sufficient in and of itself.  You also have to
re-establish any connection state that you previously had (which means
reauthenticating if necessary and executing the appropriate GROUP
command).

> From my point it is totally useless to have a server which tells me that
> he don't want to tell anything more without being reconnected.

Right.

> On the other hand I could not find a direct method to check if the
> connection is still good.

Generally you try to write the command to the server and see if you get
back -1 with an EPIPE error (I always set the SIGPIPE handler to ignore
with network code).

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: nntp 503 server timeout
#69310
Author: DS
Date: Fri, 04 Jun 2004 22:31
29 lines
2767 bytes
Russ Allbery <rra@stanford.edu> wrote in
news:87y8nh2ytx.fsf@windlord.stanford.edu: 

> Bill Davidsen <davidsen@deathstar.prodigy.com> writes:
> 
>> I have no idea what anyone was thinking... Other than confuse users
>> and generate traffic for whatever passes for a call center, not
>> telling the user why the socket dropped has no visible benefit.
> 
> You cannot tell the user why the socket was dropped.  NNTP is a
> stateful protocol where the server may not send the client information
> unless the client has sent a command.  You can get away with it in
> some cases if it's the last thing you ever send the client, but it's
> still inherently broken to do things that way.
> 
> NNTP isn't IMAP.  If one wants unprompted server messages, IMAP is the
> way to go.
> 

Why is it wrong to send a timeout message ? IMO, it's quite easy to act on 
the timeout message to do whatever cleanup needs to be done in the client, 
so it can get on with re-establishing the connection and continuing, if 
necessary. Code is already in place to parse data packets anyway, so adding 
one more match to detect the timeout message is trivial. Also, the user 
then knows why the connection is gone.



DS
Re: nntp 503 server timeout
#69311
Author: Russ Allbery
Date: Fri, 04 Jun 2004 22:43
16 lines
2071 bytes
DS <t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t> writes:

> Why is it wrong to send a timeout message ?

Because NNTP does not allow unprompted messages from the server.  The
client says something, and then the server says something, always.
Breaking this rule can result in deadlock conditions where both sides are
trying to write at the same time.  To implement a protocol that allows
either side to speak at any time, you have to use non-blocking sockets and
take other precautions, which have never been required for NNTP.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: nntp 503 server timeout
#69312
Author: Remco Blaakmeer
Date: Fri, 04 Jun 2004 22:54
17 lines
1861 bytes
On Fri, 04 Jun 2004 17:31:08 -0500, DS wrote:

> IMO, it's quite easy to act on the timeout message to do whatever
> cleanup needs to be done in the client, so it can get on with
> re-establishing the connection and continuing, if necessary.

Why can't you do that when the data connection is closed? Most decent news
readers seem to do this just fine.

> Also, the user then knows why the connection is gone.

The user shouldn't even know the connection was gone in the first place.
The news reader should detect the closed connection and set it up again
the next time it's needed.

Remco
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads