Re: WARNING! Your cache is running out of filedescriptors

From: Andre Albsmeier <andre.albsmeier@dont-contact.us>
Date: Wed, 23 Feb 2000 14:49:41 +0100

On Wed, 23-Feb-2000 at 12:02:21 +0400, Anar Babayev wrote:
> And then a number of:
> comm_open: socket failure: (55) No buffer space available
> records.
>
> Out of mbuf clusters -- adjust NMBCLUSTERS or increase maxusers! shown up on
> my FreeBSD 3.4STABLE console.

For this, you should do what it says: adjust NMBCLUSTERS or
increase maxusers

>
>
> The usage of fds is low -- about 35 (maximum 220 estimated by me) out of
> 1064.
> Current maxusers=32
> Current NMBCLUSTERS=1024
>
> The box is PII, 350Mhz, 256M RAM.

Got a similar box using: options NMBCLUSTERS=4096

>
> What should I do?
>

If I understood things correctly, the "No buffer space"
error is a temporary error. So I don't allow to adjust
filedscriptors for this type of error:

--- src/comm.c.ORI Tue Feb 15 18:10:00 2000
+++ src/comm.c Tue Feb 15 18:14:39 2000
@@ -161,6 +161,10 @@
         case EMFILE:
             debug(50, 1) ("comm_open: socket failure: %s\n", xstrerror());
             break;
+ case ENOBUFS:
+ debug(50, 0) ("comm_open: socket failure: %s\n", xstrerror());
+ debug(50, 0) ("comm_open: NOT calling fdAdjustReserved()");
+ return -1;
         default:
             debug(50, 0) ("comm_open: socket failure: %s\n", xstrerror());
         }

I never has the problem anymore since using this patch. The cache
runs really great. The debug(50, 0) lines are just because I want
to see these errors in the log...

However, I may be entirely wrong with this approach ...

        -Andre
Received on Wed Feb 23 2000 - 06:57:33 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:51:30 MST