Article View: news.software.nntp
Article #84125Re: File descriptor limits.
From: D. Stussy
Date: Sun, 12 Jun 2011 00:32
Date: Sun, 12 Jun 2011 00:32
51 lines
2900 bytes
2900 bytes
"Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:95gqhdFd2hU1@mid.individual.net...
> > I'm having a problem with the number of file descriptors.
> >
> > I'm getting these errors in my logs - wtih 1024 descriptors:
> >
> > innd: SERVER cant accept RCreader Too many open files
> > innd: innfeed! cant socketpair Too many open files
> > innd: innfeed! cant restart Too many open files
> > innd: tradindexed: cannot open /news/overview/...IDX: Too many open
files
> >
> > ....And when I increase the number ("ulimit -n") to above 1,024, I get:
> >
> > innfeed[5925]: ME fd (1026) looks too big (1024 -- FD_SETSIZE)
> > (and the connection is rejected)
>
> Pretty interestingly, I read the following code in innfeed:
>
> #if defined (FD_SETSIZE)
> if ((unsigned int) fd >= FD_SETSIZE)
> {
> sizelogged = true ;
> warn ("ME fd (%d) looks too big (%d -- FD_SETSIZE)", fd,
> FD_SETSIZE) ;
> return NULL ;
> }
> #else
> if (fd > (sizeof (fd_set) * CHAR_BIT))
> {
> sizelogged = true ;
> warn ("ME fd (%d) looks too big (%d -- sizeof (fd_set) *
CHAR_BIT)",
> fd, (sizeof (fd_set) * CHAR_BIT)) ;
> return NULL ;
> }
> #endif
>
>
>
> A useful protection!
> I wonder if it should not be implemented at other places where fd_set is
used.
>
> Several people in this newsgroup and in inn-workers suggest a switch to
> epoll() instead of select(). Is epoll() as portable as select()?
However, the problem was that ulimit was telling me I could have 8,192
concurrently open files.
Technical Details
Message-ID:
<it11ef$2n6$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mailReferences:
<ijc6vh$12l$1@snarked.org> <95gqhdFd2hU1@mid.individual.net>Show Full Headers
Complete Article Headers
Message-ID: <it11ef$2n6$1@snarked.org> Subject: Re: File descriptor limits. Date: Sat, 11 Jun 2011 17:32:59 -0700 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <ijc6vh$12l$1@snarked.org> <95gqhdFd2hU1@mid.individual.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail Newsgroups: news.software.nntp Lines: 51 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> Injection-Date: Sun, 12 Jun 2011 00:32:15 +0000 (UTC) Injection-Info: snarked.org; posting-host="pool-71-106-211-51.lsanca.dsl-w.verizon.net:71.106.211.51"; logging-data="2790"; mail-complaints-to="newsmaster+complaints@snarked.org" X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 X-Original-Bytes: 2705