Article View: news.software.nn
Article #2699PATCH in nnmaster (nntp.c)
From: J.P.M. van der Jagt
Date: Tue, 28 Apr 1992 18:51
Date: Tue, 28 Apr 1992 18:51
79 lines
3923 bytes
3923 bytes
Hi News Readers,
Lately I experienced the following situation: When the nntpserver is heavily
loaded, the nntpd after being started by the inetd exits with the message:
400 Sorry, load on server too high. Please try again later.
This message is displayed by every newsreader (rn, vn, xrn and nn) after
which the newsreader terminates. In case of nn the nnlog file gets an entry:
E: Apr 23 22:15 (jeanpaul): NNTP 400 Sorry, load on server too high.
Please try again later. response: 400
When at such an occasion nnmaster wakes up and tries to read news on the
nntpserver it too gets the same message. And it too records a message in the
nnlog file:
E: Apr 23 22:53 (M): NNTP 400 Sorry, load on server too high. Please try
again later. response: 400
And *it too exits*:
E: Apr 23 22:53 (M): Abnormal termination, exit=7
After it has send a mail to "news" (which is me):
>To: news@duteca.et.tudelft.nl
>Subject: nnmaster fatal error
>nnmaster terminated
>Fatal system error:
>NNTP 400 Sorry, load on server too high. Please try again later. response: 400
It would be much nicer if nnmaster just recorded that message and went to
sleep again. To accomplish this, I've made a change in the file nntp.c of the
nn package (release 64 + patchlevel 16 + menu_patch).
Now nnmaster records the message:
R: Apr 28 15:27 (M): NNTP 400 Sorry, load on server too high. Please try
again later. response: 400
And *doesn't* terminate, but mails to "news":
>To: news@duteca.et.tudelft.nl
>Subject: nnmaster warning
>nnmaster warning
>System error:
>NNTP 400 Sorry, load on server too high. Please try again later. response: 400
And sleeps for ten minutes and tries again to read news:
C: Apr 28 15:40 (M): Collect: 312 art, 187 gr, 83 s
The patch follows. Any comments are welcome. Happy News Reading.
John-Paul
--
[] J.P.M. van der Jagt [] Systems manager [] Delft University of Technology []
[] Email: jeanpaul@duteca.et.tudelft.nl [] Phone: 31-15-781366 [] unix unix []
[] - He sells C-shells by the seashore - Lauren Bacall - Key Largo - 1948 - []
______________________________________________________________________________
*** nntp.c.orig Mon Jun 3 14:55:02 1991
--- nntp.c Fri Apr 24 16:47:55 1992
***************
*** 502,511 ****
nntp_failed = 1;
nntp_close_server();
! if (response != ERR_TIMEOUT) { /* if not timeout, complain */
sys_error("NNTP %s response: %d", buf, response);
/* NOTREACHED */
}
try_again = 1;
group_is_set = 0;
}
--- 502,516 ----
nntp_failed = 1;
nntp_close_server();
! if (response != ERR_TIMEOUT && response != ERR_GOODBYE) {
! /* if not timeout and not goodbye, complain */
sys_error("NNTP %s response: %d", buf, response);
/* NOTREACHED */
}
+ if (response == ERR_GOODBYE) {
+ sys_warning("NNTP %s response: %d", buf, response);
+ }
+
try_again = 1;
group_is_set = 0;
}
______________________________________________________________________________
Technical Details
Message-ID:
<1992Apr28.185159.1972@donau.et.tudelft.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!mcsun!sun4nl!dutrun!donau!duteca!jeanpaulShow Full Headers
Complete Article Headers
Message-ID: <1992Apr28.185159.1972@donau.et.tudelft.nl> Subject: PATCH in nnmaster (nntp.c) Date: Tue, 28 Apr 1992 18:51:59 GMT From: jeanpaul@duteca.et.tudelft.nl (J.P.M. van der Jagt) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!mcsun!sun4nl!dutrun!donau!duteca!jeanpaul Newsgroups: news.software.nn Originator: jeanpaul@duteca.et.tudelft.nl Keywords: patch, nnmaster, fatal error, nntp Sender: news@donau.et.tudelft.nl (UseNet News System) Nntp-Posting-Host: duteca.et.tudelft.nl Reply-To: jeanpaul@duteca.et.tudelft.nl (J.P.M. van der Jagt) Organization: Delft University of Technology, Dept. of Electrical Engineering Lines: 79