[news.software.b] C News sendbatches problem

zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (03/01/90)

I recently had a site that I feed go down for awhile.  When it came back up,
I found that instead of immediately trying to catch up, C News wasn't
sending any news to the other site.   It turns out that sendbatches creates
empty batches when you ask it to spool up news that has expired and then
counts these empty batches in its calculations about how much news is
spooled.  If I waited long enough (like maybe several days), news would have
started flowing again.

One cure for this problem is to make queuelen only count non-empty (> 
1k) batches (hint: use find) and to modify sendbatches to recheck 
queuelen before exiting.  Does anyone have a better fix?  How about 
something that doesn't send empty batches at all?  

-- 
Jon Zeeff    	zeeff@b-tech.ann-arbor.mi.us  or b-tech!zeeff

henry@utzoo.uucp (Henry Spencer) (03/02/90)

In article <_+2#P#G@b-tech.uucp> zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) writes:
>I recently had a site that I feed go down for awhile... sendbatches creates
>empty batches when you ask it to spool up news that has expired and then
>counts these empty batches in its calculations about how much news is
>spooled...
>One cure for this problem is to make queuelen only count non-empty (> 
>1k) batches (hint: use find) and to modify sendbatches to recheck 
>queuelen before exiting.  Does anyone have a better fix?  How about 
>something that doesn't send empty batches at all?  

This is one place, alas, where the separation of batch splitting and
batch preparation isn't a win.  I have a definitive fix in the works.
Fiddling with queuelen (or just cranking up that site's queue limit
temporarily) is a reasonable temporary workaround for severe problems.
We hadn't seen the problem much here, perhaps because of relatively
abundant disk space (i.e. long expires) and few communications problems.
-- 
MSDOS, abbrev:  Maybe SomeDay |     Henry Spencer at U of Toronto Zoology
an Operating System.          | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

msb@sq.sq.com (Mark Brader) (03/02/90)

> > I recently had a site that I feed go down for awhile... sendbatches creates
> > empty batches when you ask it to spool up news that has expired and then
> > counts these empty batches in its calculations about how much news is
> > spooled...

> Fiddling with queuelen (or just cranking up that site's queue limit
> temporarily) is a reasonable temporary workaround for severe problems.

Another reasonable workaround, and one that you don't have to change
back afterwards, is to have a shell script along the following lines
at hand, and run it when the need is noticed:

	:
	cd /usr/spool/news/out.going
	for togo in */togo*
	do
		while read file size
		do
			test -f $file && echo $file $size
		done <$togo >tmp$$
		mv tmp$$ $togo
	done

(The above is not tested, but can't be seriously wrong, right?)
It won't be blindingly fast, but then, how often will you need to run it?
The nice part is that you don't have to remember to change anything back
when you're done with it -- just don't run it simultaneously with
sendbatches.

-- 
Mark Brader			"Bad news disturbs his game; so does good;
SoftQuad Inc., Toronto		 so also does the absence of news."
utzoo!sq!msb, msb@sq.com				-- Stephen Leacock

This article is in the public domain.