🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #18199

Re: INN-1.5.1 dying

#18199
From: Jerry Aguirre
Date: Tue, 03 Jun 1997 00:00
64 lines
2773 bytes
In article <Pine.GSO.3.93.970603154534.6913A-100000@dahlia.vszbr.cz>,
Barry BOFHwsma  <ag786@yfn.ysu.edu> wrote:
>    When I notice that this server's innd is substantially larger than it
>should be, I'll throttle it and let the buffered data for innfeed drain.
>There will be times it takes a few minutes for it to finish writing to the
>.output files.  Then I can stop and restart INN safely.  If I stop innd
>too soon after throttling it, I can easily lose a few megabytes of data
>written to an innfeed! file.

I wonder if this could be the same problem that overchan has.  Innd only
does a write once per service loop.  With enough incomming feeds the
data can exceed what the OS will allow for a single write to a pipe.
Only part of the data gets written each time and so the backlog grows
and grows.   Overchan was the first to get hit because it has the most
data written per article.

The fix is to write after each article rather than once a service loop.
The pipe is buffered and non-blocking so it will not block innd.  You
might try this patch.  It should also reduce transmission latency.

				Jerry Aguirre

*** innd/site.c.orig	Tue Dec 17 06:40:40 1996
--- innd/site.c	Thu Feb 20 10:35:49 1997
***************
*** 260,267 ****
      if (i < sp->StopWriting)
  	WCHANremove(cp);
      if ((sp->StartWriting == 0 || i > sp->StartWriting)
!      && !CHANsleeping(cp))
! 	WCHANadd(cp);
  
      cp->LastActive = Now.time;
  
--- 260,284 ----
      if (i < sp->StopWriting)
  	WCHANremove(cp);
      if ((sp->StartWriting == 0 || i > sp->StartWriting)
!      && !CHANsleeping(cp)) {
! 	if (sp->Type == FTchannel) {	/* channel feed, try the write */
! 	    int j;
! 	    if (bp->Left == 0)
! 		return;
! 	    j = write(cp->fd, (POINTER)&bp->Data[bp->Used], (SIZE_T)bp->Left);
! 	    if (j > 0) {
! 		bp->Left -= j;
! 		bp->Used += j;
! 		i = cp->Out.Left;
! 	    }
! 	    if (bp->Left <= 0)
! 		WCHANremove(cp);
! 	    else
! 		WCHANadd(cp);
! 	}
! 	else
! 	    WCHANadd(cp);
!     }
  
      cp->LastActive = Now.time;
  


Technical Details
Message-ID: <5n1qlu$1t$1@fes.whowhere.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <5mt7et$s52$1@turing.mathworks.com> <5mtdlr$ndu$1@hammer.msfc.nasa.gov> <82bu5ogp8s.fsf@manic.eecs.umich.edu> <Pine.GSO.3.93.970603154534.6913A-100000@dahlia.vszbr.cz>

Show Full Headers
Complete Article Headers
Message-ID: <5n1qlu$1t$1@fes.whowhere.com>
Subject: Re: INN-1.5.1 dying
Date: Tue, 03 Jun 1997 00:00:00 +0000
From: jerry@rigel.whowhere.com (Jerry Aguirre)
References: <5mt7et$s52$1@turing.mathworks.com> <5mtdlr$ndu$1@hammer.msfc.nasa.gov> <82bu5ogp8s.fsf@manic.eecs.umich.edu> <Pine.GSO.3.93.970603154534.6913A-100000@dahlia.vszbr.cz>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 245894585
Organization: WhoWhere?; Mt. View, CA USA
Newsgroups: news.software.nntp