Thread View: news.software.nntp
1 messages
1 total messages
Started by Jerry Aguirre
Sat, 27 Jan 1996 00:00
INN - ctlinnd timeouts fix
Author: 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
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