Squid no longer uses $SQUID_MAXFD
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
squid (Ubuntu) |
Wishlist
|
Unassigned |
Bug Description
Binary package hint: squid
After upgrading to lucid, squid ignores the setting of SQUID_MAXFD in /etc/default/squid and always uses 1024 file descriptors, which is too few for a busy proxy.
The old /etc/init.d/squid used to contain:
maxfds () {
[ -n "$SQUID_MAXFD" ] || return
[ -f /proc/sys/
if [ "$global_file_max" -lt $minimal_file_max ]
then
fi
ulimit -n $SQUID_MAXFD
}
Could we have it back in the new /etc/init/
Related branches
Chuck Short (zulcss) wrote : | #1 |
Changed in squid (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Launchpad Janitor (janitor) wrote : | #2 |
This bug was fixed in the package squid - 2.7.STABLE9-
---------------
squid (2.7.STABLE9-
* Merge from debian unstable, remaining changes:
+ 99-ubuntu-
- src/cf.data.pre:
* Add reference to snakeoil /etc/ssl
- debian/control:
+ Add ssl-cert to Depends to brin in snakeoil certificates.
+ debian/logrotate: use sarg-reports rather than sarg-maint. (LP: #268816)
+ debian/
(LP: #503777)
+ debian/
+ debian/
(
+ debian/rules: Disable optimizations for arm. (LP: #543798)
+ Dropped:
+ debian/
+ debian/
+ debian/
[Chuck Short]
* debian/
-- Chuck Short <email address hidden> Fri, 02 Jul 2010 13:43:09 -0400
Changed in squid (Ubuntu): | |
status: | Confirmed → Fix Released |
bec (support-bec) wrote : | #3 |
After testing the changes in the squid upstart configuration introduced by commit 51, package squid (2.7.STABLE9-
Setting the ulimit using the "script" section (instead of setting it in the "pre-start script" section) works.
Changed in squid (Ubuntu): | |
status: | Fix Released → Confirmed |
Tim Nicholas (tjn) wrote : | #4 |
Fix Released? I can't see anything that looks like a fix. Can someone post a link? Maybe I'm just not working launchpad properly.
As Rober Fischer The maxfds() subroutine needs to be in the 'script' section...
Or something like
limit nofile 65536 65536
could be added above 'expect fork'.
I've attached my working /etc/init/
Andrew Glen-Young (aglenyoung) wrote : | #5 |
Steps to reproduce
==================
Initial Install and Tests
-------
$ sudo apt-get install squid squid-client
$ grep MAX /etc/default/squid·
SQUID_MAXFD=1024
$ sudo status squid
squid start/running, process 2671
$ squidclient -p 3128 -l 127.0.0.1 -h 127.0.0.1 mgr:info | grep 'Maximum number'
Maximum number of file descriptors: 1024
Change SQUID_MAXFD and try again
-------
$ sudo sed -i 's/SQUID_
$ grep MAX /etc/default/squid·
SQUID_MAXFD=65536
$ sudo stop squid
squid stop/waiting
$ sudo start squid
squid start/running, process 2758
$ squidclient -p 3128 -l 127.0.0.1 -h 127.0.0.1 mgr:info | grep 'Maximum number'
Maximum number of file descriptors: 1024
Apply the patch (attached) and retry:
-------
$ sudo vi /etc/init/
[ patch ]
$ sudo status squid
squid stop/waiting
$ sudo start squid
squid start/running, process 2794
$ squidclient -p 3128 -l 127.0.0.1 -h 127.0.0.1 mgr:info | grep 'Maximum number'
Maximum number of file descriptors: 65536
That's more like it!
Note: LP#573853 was affecting me as well so I'm also running squid on Lucid with this patch applied as well.
tags: | added: patch |
DiegoWoitasen (diego-woitasen) wrote : | #6 |
The bug still exists in 11.10
This will be fixed in maverick.
chuck