🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
5 messages
5 total messages Started by Charlie Reboot Thu, 08 Jan 1998 00:00
INN internal fixed limit on incoming connections?
#25034
Author: Charlie Reboot
Date: Thu, 08 Jan 1998 00:00
64 lines
4089 bytes
Platform in question is FreeBSD, has been tuned for an ungodly number of
possible open files, so this should not be a problem.  Software is CNFS
INN based on 1.5.1 with one or two local hacks which don't seem to be the
cause of what I see, now that I've looked in the logs.

Yesterday, after countless hours sans sleep, I started seeing a problem
where inn would simply get unresponsive to incoming connections and
ctlinnd commands.  This would happen after anywhere from a few minutes to
a few hours uptime.  However, innd was still processing those connections
which had already been established, although CPU usage was significantly
higher.

Today I watched to see if there was a point where innd would just stop
answering.  I first noted that I got up to 222 incoming connections, then
next time I checked, things were hung.  After a restart, several times I
watched as the number of connections increased yet ctlinnd returned within
typically 0.030s until 223 incoming connections were reached.  Then, soon
after, innd just stopped answering.

A view into the logs at one of these times reveals the following:

Jan  8 01:06:36 news-feed innd: marley.vszbr.cz connected 251 streaming allowed
Jan  8 01:06:36 news-feed innd: hopewell.mccc.edu connected 252 streaming allowed
Jan  8 01:06:36 news-feed innd: nntp05.primenet.com connected 253 streaming allowed
Jan  8 01:06:36 news-feed innd: news1.sprintisp.com connected 254 streaming allowed
Jan  8 01:06:36 news-feed innd: newsfeed.eerie.fr connected 255 streaming allowed
Jan  8 01:06:36 news-feed innd: marley.vszbr.cz connected 256 streaming allowed
Jan  8 01:06:38 news-feed innd: news1.sprintisp.com:254 closed seconds 2 accepted 0 refused 0 rejected 0
[This is probably because I set -i down from 0 to 223 max connections]
Jan  8 01:06:38 news-feed innd: newsfeed.eerie.fr:255 closed seconds 2 accepted 0 refused 0 rejected 0
Jan  8 01:06:38 news-feed innd: free:0 0 free but was in RRMASK
Jan  8 01:06:38 news-feed innd: sc1.scconsult.com:59 cant write Broken pipe

It appears that as soon as the 256th incoming connection (after you
include the internal descriptors plus additional feeds) is reached, in
spite of the fact than innd should be quite capable of handling far more
(and it needs to, dammit), some number cycles around to 0 or something and
I see that RRMASK error, and something goes on internally plus innd stops
responding to ctlinnd or new connections.

I'm lazy and don't want to look at the code yet.  However, this rather
puts a crimp into my plans of adding hundreds of new peers, each opening a
large number of parallel non-streaming connections to keep rejected
duplicate articles down to almost zero.

Anyone familiar with the internals of innd want to tell me what to tweak
here to fix this intolerable situation?  If not, I'll just re-invent your
wheel...

(This only really seems to be a problem now during peak luser hours, when
the lines are saturated and apparent response times are awful and it takes
lots of parallel connections to get anything done.  For now, I've set a
limit on incoming connections to 222, which is barely protection in case
connections are made as innd is blocked doing something else, and this
number of connections is regularly reached.)


Thanks,
Barry Bouwsma, Tele Danmark Internet
a limit of 65536 descriptors seems much more reasonable, hmmph


Re: INN internal fixed limit on incoming connections?
#24994
Author: Marc Slemko
Date: Thu, 08 Jan 1998 00:00
28 lines
1724 bytes
In <Pine.BSF.3.96.980108023016.21255A-100000@coredump.int.tele.dk> Charlie Reboot <f00fc7c8@int.tele.dk> writes:

>Platform in question is FreeBSD, has been tuned for an ungodly number of
>possible open files, so this should not be a problem.  Software is CNFS
>INN based on 1.5.1 with one or two local hacks which don't seem to be the
>cause of what I see, now that I've looked in the logs.

What version of FreeBSD?

Did you redefine FD_SETSIZE in the appropriate places?  If not, select
will die with 256 descriptors (on 2.2, I think it is 1k on -current).

A ktrace should show you want system calls are failing.

Oh yea, some of the resolver routines fail in some versions of
FreeBSD on fds over the FD_SETSIZE from when libc was compiled
which could cause you problems.  To fix you have to recompile libc
with a bigger FD_SETSIZE.

Note that, unlike certain dumb OSes, FreeBSD does _not_ have a 
256 limit on the stdio FILE structures.

http://www.apache.org/docs/misc/descriptors has some misc info and 
I think I put something in the Apache FAQ about descriptors and
FreeBSD.

Re: INN internal fixed limit on incoming connections?
#25029
Author: Andrew Gierth
Date: Thu, 08 Jan 1998 00:00
13 lines
1080 bytes
>>>>> "Charlie" == Charlie Reboot <f00fc7c8@int.tele.dk> writes:

 Charlie> Platform in question is FreeBSD, has been tuned for an
 Charlie> ungodly number of possible open files, so this should not be
 Charlie> a problem.

What version exactly, and what has been done about FD_SETSIZE?

-- 
Andrew.

Re: INN internal fixed limit on incoming connections?
#25035
Author: Sang-yong Suh
Date: Thu, 08 Jan 1998 00:00
28 lines
1972 bytes
In article <Pine.BSF.3.96.980108023016.21255A-100000@coredump.int.tele.dk>,
Charlie Reboot  <ag786@yfn.ysu.edu> wrote:
>I'm lazy and don't want to look at the code yet.  However, this rather
>puts a crimp into my plans of adding hundreds of new peers, each opening a
>large number of parallel non-streaming connections to keep rejected
>duplicate articles down to almost zero.

I guess that may not be the best solution.  Keeping a large number of
simultaneous connections wastes your input memory.  Also, it will make
your feeders consume more resources.

Why not allow your domestic peers make duplicates, i.e., skip WIPcheck
if the article is comming from a neerby host connected via relatively
inexpensive network.  This will make some duplciates, but increases the
chance of getting articles via your neighbor.  If you and your domestic
partners do this, both of you can share the expensive lines.

I know a site who is doing just like you.  And the site is receiving
almost SAME NUMBER OF ARTICLES from all of its peers, whether domestic
or trans-pacific.  The site can save his line, but his news is way
slooow.  Very little contribution to other partners.  You want to
receive more from your neighbors, give more to your neighbors,
and want to save the expensive trans-atlantic line.
--
sysuh

Re: INN internal fixed limit on incoming connections?
#25058
Author: Charlie Reboot
Date: Fri, 09 Jan 1998 00:00
29 lines
1933 bytes
On 39 Dec 1997, Marc Slemko wrote:

> Did you redefine FD_SETSIZE in the appropriate places?  If not, select
> will die with 256 descriptors (on 2.2, I think it is 1k on -current).

   I'd like to thank all who graciously helped me out in my time of
need...  It turns out that with FreeBSD 2.2.5-STABLE and a suitably-
built kernel, it was only needed to add -DFD_SETSIZE=1024 to the INN
config.data CFLAGS and recompile.  And at least this time, no serious
failure of the resolver routines were observed with connections using fd
256, or fd 257, or fd 258...

   Individuals who do not tune their compilation this way should start
innd with flag of -i 210 to 220 to keep from reaching the point where innd
refuses to respond to the outside world.  That is, even with file
descriptors aplenty, you'll reach this limit with this release before you
are in danger of throttling from too many open files.

    Now I no longer have to stay awake and restart innd if it gets too
many incoming connections, and I can keep piling on heaps of incoming
connections until I reach the next roadblock.  Whoopie.  Thanks again.


Barry Bouwsma
I'm waiting...


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