Article View: news.software.nntp
Article #4345INN - ctlinnd timeouts fix
From: Jerry Aguirre
Date: Sat, 27 Jan 1996 00:00
Date: Sat, 27 Jan 1996 00:00
48 lines
2718 bytes
2718 bytes
There have been several reports of ctlinnd commands taking a long time
to respond. Not only is this a pain for the administrator but in
extreme cases they prevent outgoing queues from functioning when the
"flush" commands fail.
The problem seems to be a combination of several things. First is that
as inn loops thru all the channels it is servicing it only checks the
ctlinnd once. After that it goes off and services all the other ready
channels before again checking to see if the control channel has more
work.
On a server with lots of incoming connections a loop thru them could
take many seconds. Each one might have an article to be written to
disk or a history ID to be checked. Streaming NNTP aggrivates this as
a single channel might process several buffered transactions during one
pass.
Adding to the problem is that innd only services one ctlinnd request on
each pass. If you are running innwatch, nntpsend, or sendbatch then
they also issue ctlinnd commands. So, while you are waiting for
ctlinnd to respond, innd could loop thru a dozen or more incomming
feeds, process some other ctlinnd request, again loop thru a dozen or
more feeds, again process some other ctlinnd requst, and then finally
get to yours.
The simplest answer seems to be to limit the number of channels that
will be serviced on each loop. This allows innd to check for multiple
control requests more frequently.
In innd/chan.c in the function CHANreadloop() add the indicated line:
/* Try the control channel first. */
if (FD_ISSET(CHANccfd, &RCHANmask) && FD_ISSET(CHANccfd, &MyRead)) {
count--;
+ if (count > 3) count = 3; /* might be more requests */
(*CHANcc->Reader)(CHANcc);
FD_CLR(CHANccfd, &MyRead);
}
A limit of 3 seems to have worked for me. Monitoring was showing
frequent cases where 16 requests were being serviced before checking for
each control request. This was taking as much as 2 minutes. Now the
longest delay I have seen is 11 seconds and it is more typically less
than 2 seconds.
Jerry Aguirre
Technical Details
Message-ID:
<4ec616$qnd@olivea.ATC.Olivetti.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-mailShow Full Headers
Complete Article Headers
Message-ID: <4ec616$qnd@olivea.ATC.Olivetti.Com> Subject: INN - ctlinnd timeouts fix Date: Sat, 27 Jan 1996 00:00:00 +0000 From: jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre) 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: 136693979 Organization: Olivetti ATC; Cupertino, CA; USA Newsgroups: news.software.nntp Summary: patch to check control connections more frequently