Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 21:48:08 +0200
From:      "Nicolai Petri" <freebsd@petri.cc>
To:        "Jim Mercer" <jim@reptiles.org>
Cc:        <freebsd-questions@freebsd.org>, <freebsd-hackers@freebsd.org>
Subject:   Re: totally weirdass problem, Squid-2.3-4 and FreeBSD
Message-ID:  <006901c12c0c$88e6a090$8632a8c0@atomic.dk>
References:  <20010823153250.H10630@reptiles.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Jim,

A quick guess is that you launch squid before the sysctl variable is set.

And squid reads the max number of openfiles when it is loaded. That would
explain why it gets it wrong on reboots but okay when you recompile (When
you load it again the sysctl is correct!)

Best regards,
---
Nicolai Petri
Software Developer

----- Original Message -----
From: "Jim Mercer" <jim@reptiles.org>
To: <freebsd-hackers@FreeBSD.ORG>; <freebsd-questions@FreeBSD.ORG>
Sent: Thursday, August 23, 2001 9:32 PM
Subject: totally weirdass problem, Squid-2.3-4 and FreeBSD


>
> [ i'm not on hackers or questions lists, so a Cc: would be appreciated on
any
>   replies ]
>
> i have a squid server in pakistan that is exhibiting some really, really
screwy
> behaviour.
>
> firstly, it is running FreeBSD 4.x-stable (circa Feb 2001)
>
> secondly it is running squid-2.3 stable4
>
> when we initially set it up, we found that the default kernel maxfiles of
> 2088 was inadequate.
>
> using sysctl (/etc/sysctl.conf) we bumped it (and procmaxfile) up to
10000.
>
> squid didn't seem to find the 10000 after this, only 2088.
>
> someone mentioned that squid calculates the number of descriptors at
compile
> time.
>
> so, we recompiled squid, restarted, and voila, it found the 10000.
>
> a few weeks ago, i was informed that it was running out of file
descriptors.
>
> i checked it out, and for some reason, squid was only seeing 2088 again.
>
> sysctl -a showed me that it was in fact having 10000.
>
> i figured maybe someone re-installed squid.
>
> so i did a:
>
> # cd /usr/ports/www/squid23
> # make clean
> # make
> # make install  (or maybe reinstall)
>
> restarted squid, and lo and behold, it was seeing 10000 descriptors again.
>
> yesterday, i got a message that it was out of descriptors again.
>
> this time, i noticed that the box had been rebooted recently.
>
> sysctl -a still showed 10000, but squid was only seeing 2088.
>
> now, this is the weird, weird, weird part.
>
> without rebooting or anything, i killed squid and did:
> # cd /usr/ports/www/squid23
> # make reinstall
>
> i restarted squid, and lo and behold, it saw 10000 descriptors.
>
> i had a close look at what "make reinstall" did, and as best i can tell it
> did not update any config files, just programs.
>
> now, WTF would cause the binary to get a different perspective on the
> number of file descriptors between boottime and reinstall ?
>
> --
> [ Jim Mercer        jim@reptiles.org         +1 416 410-5633 ]
> [ Now with more and longer words for your reading enjoyment. ]
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006901c12c0c$88e6a090$8632a8c0>