Search squid archive

Re: 3.2.5 comm_open: socket failure: (24) Too many open files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/12/2012 9:13 p.m., Tianyin Xu wrote:
Yes, I also would like to take a look at the patch!

There is no patch. The code has worked that way since at least Squid 3.1.

You can view the two functions here:
http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/src/tools.cc#L923

* Squid_MaxFD initial value is set from ./configure.

* setMaxFD() gets run on startup to see if the system limit is smaller.

* confguration file gets p

* setSystemLimits() gets run shortly after setMaxFD then Squid logs:

The log message on startup is "With " << Squid_MaxFD << " file descriptors available"


The only way to identify whether there is a different file FD limit and socket FD limit is to wait until sockets fail. Squid watches for those cases and "reserves" all the unused FD when failures happen. The log message is "Reserved FD adjusted from 100 to 15391 due to failures"


Amos



Best,
T

On Sun, Dec 30, 2012 at 12:11 AM, Jackie Zhang
<jackie.qq.zhang@xxxxxxxxx> wrote:
Dear Eliezer,

Can you show me the code snippet? Perhaps it's not in the current
stable version? because users usually do not pull from trunk but
download the "stable" version from the website.

t


On Sat, Dec 29, 2012 at 11:53 PM, Eliezer Croitoru <eliezer@xxxxxxxxxxxx> wrote:
There is..
and squid does that..
the limit in compilation options just set the settings to this specific
default which if not available ignored and uses the limit by the system and
it's logged in the cache.log file.

Maybe this function dosnt work well but I'm almost sure it works fine since
it works fine for me.

Eliezer


On 30/12/2012 09:21, Tianyin Xu wrote:
yes, it's confusing to have two different fd limits, one for squid and
one for OS.

I wonder is it possible to obtain the system fd limits, and put it in
the log message when squid is running out of fds? I think that would
solve all these kind of problems.

T





On Sat, Dec 29, 2012 at 3:27 PM, Eliezer Croitoru <eliezer@xxxxxxxxxxxx>
wrote:
Great!
Nice to know that.


On 30/12/2012 00:02, 叶雨飞 wrote:

ubuntu 10.04 .   and appearently /etc/security/limits.conf is not
working on it because it doesn;t configure with pam_session.

I just added ulimit -n 65535 in my launch script


--
Eliezer Croitoru
https://www1.ngtech.co.il
sip:ngtech@xxxxxxxxxxxx
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il



--
Eliezer Croitoru
https://www1.ngtech.co.il
sip:ngtech@xxxxxxxxxxxx
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux