🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #8077

Re: Linux unoff 4 experiences and queries

#8077
From: Alan Brown
Date: Wed, 29 May 1996 00:00
100 lines
4631 bytes
Hmmm. following up my own posts....

>Another problem which seems to have gotten worse:
>
>People are reporting timeouts connecting to the server (ie, before INN 
>notices them and spawns nnrpd) and timeout/disconnections from the server
>while retrieving headers and/or articles. 


The connection timeouts turned out to be due to increased speed of our
streaming newsfeeds sucking away INN's attention. I'm still trying to
track down what's causing the timeout/disconnects once nnrpd is running
and feeding articles to the reader. 

Startup timeouts can be avoided by setting up something separate to spawn
nnrpd (move incoming feeds to another port and/or setup inetd to listen and
spawn on another port such as 1119), or as I discovered, installing
Crosspost. The performance increase was astounding. From nnrpd startup
times in excess of 2 minutes from connect, I've gone down to a maxiumum
tested startup delay of 22 seconds. 

Having said that, the suggested newfeeds entry in the man page has a 
minor error. (Has this been discussed before Dave?) 

Theres also nothing to be found in the FAQ on this program by grepping 
for "crosspost" (heiko?)

Here's what my entry looks like:

CROSSPOST!:*:Tc,Ap,WR:/usr/local/news/bin/crosspost -s -

The -s is important - crosspost running without it does a disk sync after
every link written, which is a serious slowdown, but having added the -s 
you also need the stdin switch. Syncing after every write is much safer 
of course, but IMO losing a few articles/links in a crash is tolerable. 

I knocked up a couple cleanup scripts based around the man page 
suggestions too. These run hourly and daily on my system, shlocked to 
prevent anything going haywire. 

The first script will generate a *lot* of error messages saying that
symlinking couldn't take place. This is normal behaviour, but should
probably be taken care of properly in crosspost itself. (Jerry?)
I suspect the history preen would be a lot faster if called with a switch
which enabled checking for links rather than blindly trying to write over
existing ones but on a 2 million line history file it only took an hour to
run anyway. :)

If the second script ever actually does any work your system is probably 
in serious trouble... :)

======
# crosspost.preen-history
#!/bin/sh

# script to run crosspost to preen the disks/history file, ensuring that 
# only one copy is running. 
# AJB 29 May 1996

       LOCK=/usr/local/news/LOCK.crosspost.history
          trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
          if /usr/local/news/bin/shlock -p $$ -f ${LOCK} ; then
              # Do appropriate work
	       /usr/bin/awk < /usr/lib/news/history -F '	' '(NF > 2){print $3}' | /usr/lib/news/bin/crosspost -s -
          else
              echo Locked by `cat ${LOCK}`
          fi
exit 0

========
#crosspost.flush-out.going
#!/bin/sh

# script to run crosspost on any overflow in out.going, ensuring that only 
# one copy is running. 
# AJB 29 May 1996

       LOCK=/usr/local/news/LOCK.crosspost.out.going
          trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
          if /usr/local/news/bin/shlock -p $$ -f ${LOCK} ; then
              # Do appropriate work
		if [ -f /var/spool/news/out.going/CROSSPOST\!]; then
                   mv /var/spool/news/out.going/CROSSPOST\! /var/spool/news/out.going/CROSSPOST\!.lagged
		   /usr/lib/news/bin/ctlinnd flush CROSSPOST!
 		   /usr/lib/news/bin/crosspost -s /var/spool/news/out.going/CROSSPOST\!.lagged
		   rm /var/spool/news/out.going/CROSSPOST\!.lagged
                fi
          else
              echo Locked by `cat ${LOCK}`
          fi
exit 0

======
-- 
"But you can't say they have arrived to classify your nervous lies
 What's right, what's not, what may not be. Don't try your tricky tests on me
 For I won't live in fear my friend - that every day could be my end"

Technical Details
Message-ID: <4ohaov$9ni@papaioea.manawatu.gen.nz>
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: <4nv5bm$e3d@papaioea.manawatu.gen.nz>

Show Full Headers
Complete Article Headers
Message-ID: <4ohaov$9ni@papaioea.manawatu.gen.nz>
Subject: Re: Linux unoff 4 experiences and queries
Date: Wed, 29 May 1996 00:00:00 +0000
From: alan@papaioea.manawatu.gen.nz (Alan Brown)
References: <4nv5bm$e3d@papaioea.manawatu.gen.nz>
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: 157335438
Content-type: text/plain; charset=iso-8859-1
Organization: PlaNet (NZ) Manawatu, Palmerston North +64 6 357-9245, Levin +64 6 367 9944
Mime-version: 1.0
Newsgroups: news.software.nntp