From owner-freebsd-net Wed Jul 26 13:43:56 2000 Delivered-To: freebsd-net@freebsd.org Received: from hotmail.com (f97.law7.hotmail.com [216.33.237.97]) by hub.freebsd.org (Postfix) with SMTP id 268D637B5D3 for ; Wed, 26 Jul 2000 13:43:50 -0700 (PDT) (envelope-from johnnyteardrop@hotmail.com) Received: (qmail 79439 invoked by uid 0); 26 Jul 2000 20:43:49 -0000 Message-ID: <20000726204349.79438.qmail@hotmail.com> Received: from 209.249.186.215 by www.hotmail.com with HTTP; Wed, 26 Jul 2000 13:43:49 PDT X-Originating-IP: [209.249.186.215] From: "Greg Thompson" To: freebsd-net@freebsd.org Subject: socket() and ENOBUFS Date: Wed, 26 Jul 2000 16:43:49 EDT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org net hackers, i have a multithreaded app in which each thread repeatedly opens a socket, sends some data, receives some data, then closes the socket. as such, the total number of open sockets is bounded by the number of threads. i'm finding that over time, i start getting ENOBUFS from my calls to socket(). if, in response to this, i make the code pause for somewhere between 10 and 60 seconds (i don't have an exact number), it can start opening sockets again. my questions are: what exactly is going on here? systat -mbufs shows the free pool drop down to the ~200 range. after killing the process, it seems to take some time for mbufs in use to be freed. is there a resource limit than can be raised on my system to postpone the blockage? i'm fairly new to freebsd. i've tried grepping through /usr/src/sys a bit to find the code that gets hit when a socket is created, but i've had no luck. i see the entry for the syscall in syscalls.master, but i don't see the code that gets hit when the syscall is invoked. how do i visually follow a syscall? thanks. -- -greg ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message