🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Jungshik Shin Mon, 26 May 1997 00:00
innd doesn't accept articles during news.daily run
#17999
Author: Jungshik Shin
Date: Mon, 26 May 1997 00:00
46 lines
2754 bytes
   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.

May 24 03:19:29 news innd: news-out.internetmci.com:11 readclose May 24
03:19:29 news innd: news-out.internetmci.com:11 closed seconds 300
   accepted 0 refused 0 rejected 0

 Inn FAQ mentions about 'readclose' message, but that doesn't seem to be
applied to my problem as this happens only while 'news.daily' is running
and incoming feed works fine without news.daily running.


  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

  Without delayrm option to news.daily, it takes about 8 hours(SS 20,
7GB spool, the server has about 100 local groups + Big8+bionet,gnu and
some others. I don't have the full control of the machine, yet so that I
don't know any other details like disk config. and memory ). Now, with
delayrm, it takes much less(only about 3 hours) but with problems
mentioned above.

   Is there any way I can fix this problem before upgrading to inn 1.5.1
which I'll do sooner or later (but not in a few days)? overview files
are scattered all across news spool(i.e. it doesn't have directory
tree separate from news spool). Could it be a problem? 

  I'd be greatly obliged to anyone for any enlightening information on
  ths issue.

    Jungshik Shin

Re: innd doesn't accept articles during news.daily run
#18054
Author: Jungshik Shin
Date: Wed, 28 May 1997 00:00
179 lines
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

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads