Article View: news.software.nntp
Article #18054Re: innd doesn't accept articles during news.daily run
From: Jungshik Shin
Date: Wed, 28 May 1997 00:00
Date: Wed, 28 May 1997 00:00
179 lines
7946 bytes
7946 bytes
Jungshik Shin <jshin@pantheon.yale.edu> wrote:
: I'm running inn 1.4(yes, it's pretty old and I know I need to upgrade
: to 1.5.1) under Solaris 2.5.1(Sun SS-20) and recently changed crontab
: for news.daily, after which innd doesn't accept articles from upstream
: feeding site while news.daily is running. Neither does it accept
: posting. All the articles anyone attempted to post during news.daily run
: showed up after news.daily is over even if they're given up by news
: reader(e.g. in tin by pressing CTRL-C after waiting several minutes for
: server response). Typical log lines during this 'black-out' period for
: upstream-connection is as following.
After skimming over news.notice and expire.log and examining
news.daily script, I found why this happened. Because of lack of space,
I needed(actually done by my predecessor) to put history.n and related
files in a directory different from one where history is stored, so that
expire is called with '-d<dir>' flag. This causes innd to get paused and
it should get restarted by the calling script (in this case news.daily)
according to the manual of expire.
: The change I made was comment out the first two lines and
: add the last two lines.
: #0 2 * * * /usr/local/news/bin/news.daily
: #0 5 * * 1 /usr/local/news/bin/expireover -s
: 40 2 * * * /usr/local/news/bin/news.daily delayrm expireover
: 11 0 * * 5 /usr/lib/news/bin/expireover -a > /dev/null 2>&1
Log files(news.notice and expire.log) showed me that
innd is paused right before 'expire' invoked by news.daily gets
done. The pause lasts until expireover and expirerm end their
tasks. It takes about half an hour on my server to expire
overview(expireover) while it takes 2+ hours for expirerm
to do its job(if news.daily is invoked with delayrm flag).
The order news.daily(as of inn 1.4unoff4. news.daily in inn 1.4unoff4
appears to be the same as one in inn1.4 as far as this part is
concerned) does various parts of its job is as following( time in ()
indicates how long each step takes on my server)
A. invoked without delayrm
1. expire(change history file) while
deleting expired articles real-time ( 5-6 hours)
* innd is paused right before expire is done
2. expireover ( 30 min.)
3. move new history file(history.n) to history ( < a few min.)
4. resume innd if throttled or paused
B. invoked with delayrm
1. expire(change history file) while saving the list of articles
to be deleted in the file named expire.rm ( 15 min.)
* innd is paused right before expire is done
2. expireover ( perhaps 30min)
3. actually delete articles in expire.rm( about 2 hours)
4. move new history file(history.n) to history ( < a few min.)
5. resume innd if throttled or paused
As you can see, innd is paused for about 30min when news.daily
is invoked without delayrm(case A) while it's paused
for over 2hours with delayrm.
Now, my question is whether it's OK to take step 3 and 4(4 and 5 in
case B) BEFORE step 2 (step 2 and 3 in case B) by modifying news.daily.
It seems to me that keeping innd on hold(in pause) for the extended
period(30 min. in case A and over 2 hours in case B) even after the
update of history file ) is not necessary nor acceptable. This problem
might have not surfaced as no one has ever had separate path for history
and history.n(thus no need to invoke expire with '-d<dir>'). Well, I'm
not sure if I'm getting all these right.
Anyway, I'd be very grateful if any one could answer my question about
shuffling step 2(step 2 and 3 in case B) and step 3 and 4(step 4 and 5
in case B), which is equivalent to modifying news.daily as shown below.
Any other comment and help(to solve this problem of innd being kept on
hold too long ) would be greatly appreciated as well.
-------- Before change------------
## Actual expire the articles (finally!).
if ${DOEXPLOG}; then
echo "expire begin `date`: (${EXPIREFLAGS})" >>${EXPLOG}
( exec 2>&1 ; eval expire "${EXPIREFLAGS}" ) \
| ${SED} -e 's/^/ /' >>${EXPLOG}
echo " expire end `date`" >>${EXPLOG}
else
eval expire "${EXPIREFLAGS}"
fi
test -n "${RMFILE}" -a -f "${RMFILE}" && {
sort -u -o ${RMFILE} ${RMFILE}
${DOEXPIREOVER} && {
eval expireover "${EXPIREOVERFLAGS}"
DOEXPIREOVER=false
}
expirerm ${RMFILE}
}
${DOEXPIREOVER} && eval expireover "${EXPIREOVERFLAGS}"
## If built on another filesystem, move history files.
if [ -n "${EXPDIR}" ] ; then
if [ ! -f ${EXPDIR}/history.n -o ! -f ${EXPDIR}/history.n.done ] ; then
( echo "$0: No new history files"; ${INNSTAT} ) | eval ${MAIL}
exit 1
fi
mv -f ${EXPDIR}/history.n ${HISTORY}
mv -f ${EXPDIR}/history.n.dir ${HISTORY}.dir
mv -f ${EXPDIR}/history.n.pag ${HISTORY}.pag
rm -f ${EXPDIR}/history.n.done
case "${EXPIREFLAGS}" in
*-n*)
;;
*)
MESSAGE="${REASON}"
;;
esac
fi
## Restart the server if we need to.
if ${THROTTLED} || test -n "${MESSAGE}" ; then
ctlinnd -s go "${MESSAGE}" 2>&1 || {
( echo "$0: Cannot unthrottle news"; ${INNSTAT} ) | eval ${MAIL}
exit 1
}
fi
-------------------------
-------- After change------------
## Actual expire the articles (finally!).
if ${DOEXPLOG}; then
echo "expire begin `date`: (${EXPIREFLAGS})" >>${EXPLOG}
( exec 2>&1 ; eval expire "${EXPIREFLAGS}" ) \
| ${SED} -e 's/^/ /' >>${EXPLOG}
echo " expire end `date`" >>${EXPLOG}
else
eval expire "${EXPIREFLAGS}"
fi
## If built on another filesystem, move history files.
if [ -n "${EXPDIR}" ] ; then
if [ ! -f ${EXPDIR}/history.n -o ! -f ${EXPDIR}/history.n.done ] ; then
( echo "$0: No new history files"; ${INNSTAT} ) | eval ${MAIL}
exit 1
fi
mv -f ${EXPDIR}/history.n ${HISTORY}
mv -f ${EXPDIR}/history.n.dir ${HISTORY}.dir
mv -f ${EXPDIR}/history.n.pag ${HISTORY}.pag
rm -f ${EXPDIR}/history.n.done
case "${EXPIREFLAGS}" in
*-n*)
;;
*)
MESSAGE="${REASON}"
;;
esac
fi
## Restart the server if we need to.
if ${THROTTLED} || test -n "${MESSAGE}" ; then
ctlinnd -s go "${MESSAGE}" 2>&1 || {
( echo "$0: Cannot unthrottle news"; ${INNSTAT} ) | eval ${MAIL}
exit 1
}
fi
test -n "${RMFILE}" -a -f "${RMFILE}" && {
sort -u -o ${RMFILE} ${RMFILE}
${DOEXPIREOVER} && {
eval expireover "${EXPIREOVERFLAGS}"
DOEXPIREOVER=false
}
expirerm ${RMFILE}
}
${DOEXPIREOVER} && eval expireover "${EXPIREOVERFLAGS}"
--------------------
Jungshik Shin
Technical Details
Message-ID:
<5mgvj6$6ch@net161-61.student.yale.edu>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-mailReferences:
<5mcnak$6fm@net161-61.student.yale.edu>Show Full Headers
Complete Article Headers
Message-ID: <5mgvj6$6ch@net161-61.student.yale.edu> Subject: Re: innd doesn't accept articles during news.daily run Date: Wed, 28 May 1997 00:00:00 +0000 From: Jungshik Shin <jshin@pantheon.yale.edu> References: <5mcnak$6fm@net161-61.student.yale.edu> 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: 244421625 Distribution: inet Sender: jungshik@net161-61.student.yale.edu Organization: Yale University, Physics Dept. Reply-To: jshin@pantheon.yale.edu Newsgroups: news.software.nntp