Article View: news.software.nn
Article #4603patch to fix server load bug...
From: David Maltz
Date: Fri, 06 Aug 1993 23:42
Date: Fri, 06 Aug 1993 23:42
83 lines
3315 bytes
3315 bytes
Our site has been having problems with the load on the news server
going above 6. This wouldn't be a problem except that nntp daemons
have this cute habit of refusing any new connections when the load is
above 6. This in itself is a fine way of reducing the load on the
server, but nn 6.4.16's behavior clashes against it. If the server
load is above 6, nn will show the user a menu of available subjects,
let the user chose which articles to read, and then dump the user out
of nn with out saving the selections when it tries to connect to the
server.
The patchs below to nntp.c and more.c seem to fix this. The new
behavior is to put a message on the screen that nn couldn't connect
to the server, and then put the user back into the article selection
mode. If the user hits space again, another attempt to connect will
be made. If the user quits out of nn, the selection should be saved
as usual. As always, no guarantees, warantees, promise of fitness
for use, etc, etc, etc...
-Dave Maltz
maltz@parc.xerox.com
+1 415 812 4950
-Stnd Disclaimer: I do not speak for the company.
- cut here for context diffs -
*** nntp.c Fri Aug 6 13:58:53 1993
--- /import/misc/nn-6.4.16/nntp.c Sun Jan 13 12:01:43 1991
***************
*** 416,431 ****
can_post = 0;
break;
default:
! msg("Couldn't connect to server %s (server sez:%s)",
! nntp_server,line);
! is_connected = 0;
! fclose(nntp_out);
! fclose(nntp_in);
! user_delay(2);
! return -1;
! /* user_error(line); -removed to get rid of nn's annoying habit of
! dumping the user out of the program whenever
! the news server's loadav is > 6 -dam */
/* NOTREACHED */
}
}
--- 416,422 ----
can_post = 0;
break;
default:
! user_error(line);
/* NOTREACHED */
}
}
*** more.c Fri Aug 6 16:04:30 1993
--- /import/misc/nn-6.4.16/more.c Wed Nov 13 15:55:57 1991
***************
*** 337,345 ****
int open_modes, hdr_mode, o_mode;
struct header_def *hdef;
extern int alt_cmd_key, in_menu_mode, any_message;
- #ifdef NNTP
- extern int nntp_failed; /* from nntp.c -dam */
- #endif
#ifdef RESIZING
int entry_col = Columns;
#endif
--- 337,342 ----
***************
*** 361,370 ****
}
art = open_news_article(ah, open_modes, ngheader, dgheader);
-
- #ifdef NNTP
- if (nntp_failed) return MC_MENU; /* couldn't read the news... -dam*/
- #endif /* NNTP */
if (art == NULL) {
if (expired_msg_delay >= 0) {
--- 358,363 ----
Technical Details
Message-ID:
<maltz.744680526@intrepid>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!gmd.de!Germany.EU.net!mcsun!uunet!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!biosci!parc!maltzShow Full Headers
Complete Article Headers
Message-ID: <maltz.744680526@intrepid> Subject: patch to fix server load bug... Date: Fri, 06 Aug 1993 23:42:06 +0000 From: maltz@parc.xerox.com (David Maltz) 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!gmd.de!Germany.EU.net!mcsun!uunet!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!biosci!parc!maltz Newsgroups: news.software.nn Keywords: patch, loadav, nn, server, nntp Sender: news@parc.xerox.com Organization: Xerox PARC Lines: 83