Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2013 11:27:34 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Alie Tan <alie@affle.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@FreeBSD.org>, Ronald Klop <ronald-freebsd8@klop.yi.org>
Subject:   Re: kern.ipc.maxsockets limit reached on Raspberry
Message-ID:  <1363973254.1157.144.camel@revolution.hippie.lan>
In-Reply-To: <CANuCnH-1ieG5swiZyeS0-zqOT7hJwf28PCXHR9Za-Qj-hy2bcQ@mail.gmail.com>
References:  <CANuCnH-Y4UoMoihO1R1NNj2GgT4XG6tn3Z51-ZFAm62rHcF7Ow@mail.gmail.com> <CANuCnH8M9F70-_sKw%2BzLKyL9L9DWqStwddp0anPN5EYV%2Be=8Gg@mail.gmail.com> <op.wt48mytt8527sy@ronaldradial.versatec.local> <CANuCnH-1ieG5swiZyeS0-zqOT7hJwf28PCXHR9Za-Qj-hy2bcQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2013-03-22 at 20:36 +0800, Alie Tan wrote:
> On Mon, Mar 18, 2013 at 9:19 PM, Ronald Klop <ronald-freebsd8@klop.yi.org>wrote:
> 
> > On Mon, 18 Mar 2013 13:28:19 +0100, Alie Tan <alie@affle.com> wrote:
> >
> >  Forgot to mention. I can't SSH to the device once this issue occurred.
> >>
> >
> > That is expected. SSH needs a socket, so as maxsockets is reached... You
> > get the point. ;-)
> >
> >
> >>
> >> On Mon, Mar 18, 2013 at 8:23 PM, Alie Tan <alie@affle.com> wrote:
> >>
> >>  Hi,
> >>>
> >>> I just got this issue on my Hiawatha web-server on Raspi 512MB with
> >>> FreeBSD r247518. This issue happens every 1-2 days.
> >>>
> >>> Anyone got any clue about this issue? I can increase the maxsockets but
> >>> it
> >>> seems just a workaround.
> >>>
> >>
> >
> > You can put this in cron. (From the top of my head so beware of typos.)
> >
> > */15 * * * * sockstat
> >
> > This will mail you the open sockets every 15 minutes. See what is growing
> > infinitely.
> >
> Strange http://ompldr.org/vaHVocQ/P30322-202828.jpg
> 
> All Foreign addresses are *.* and seems opened sockets also still normal,
> not above maxsockets
> 

That's seems to be, if anything, not enough sockets open, and no udp
sockets at all (do you not run ntpd? syslogd?  they normally have udp
sockets open).  Just to make sure the values themselves are sane, what
does sysctl kern.ipc.maxsockets show?  How about vmstat -z | grep inpcb?
On my (completely idle) rpi, I see this:

rpi# sysctl kern.ipc.maxsockets
kern.ipc.maxsockets: 16389

rpi# vmstat -z | grep inpcb
udp_inpcb:              252,  16395,       4,      26,    1928,   0,   0
tcp_inpcb:              252,  16395,       2,      28,       6,   0,   0

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1363973254.1157.144.camel>