diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-28 08:55:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-28 09:41:12 +0000 |
commit | 6a318d9bbac8c9ca145cd985329b35e4489af750 (patch) | |
tree | 737a634bf8a88730b66f4aad0d7d057a59f71540 | |
parent | 5044db2a0efc6ce6d34e1f5130a47e32960f4d3c (diff) | |
download | aports-6a318d9bbac8c9ca145cd985329b35e4489af750.tar.bz2 aports-6a318d9bbac8c9ca145cd985329b35e4489af750.tar.xz |
main/squid: allow more than 16384 filedescriptors
It seems that when squid is compiled with --with-filedescriptors, that
becomes a hard limit[1]. Without this compile option it will use the
system ulimit setting, which is the behaviour we want.
For compatibility we set SQUID_MAXFD to 16384 if unset but still allow
it to go over 16384 if needed. It should also be possible to set
max_filedescriptors in squid.conf[2].
fixes #2850
[1] https://bugzilla.redhat.com/show_bug.cgi?id=976815
[2] http://www.squid-cache.org/Versions/v3/3.3/cfgman/max_filedescriptors.html
-rw-r--r-- | main/squid/APKBUILD | 9 | ||||
-rw-r--r-- | main/squid/squid.initd | 7 |
2 files changed, 6 insertions, 10 deletions
diff --git a/main/squid/APKBUILD b/main/squid/APKBUILD index e653ce7801..0fc8680068 100644 --- a/main/squid/APKBUILD +++ b/main/squid/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=squid pkgver=3.3.10 -pkgrel=0 +pkgrel=1 pkgdesc="A full-featured Web proxy cache server." url="http://www.squid-cache.org" install="squid.pre-install squid.pre-upgrade" @@ -77,7 +77,6 @@ build() { --enable-htcp \ --enable-carp \ --enable-poll \ - --with-filedescriptors=16384 \ --enable-follow-x-forwarded-for \ --with-large-files \ --with-default-user=squid \ @@ -112,20 +111,20 @@ md5sums="ff69d08818ee008f66666f79bb27b9ee squid-3.3.10.tar.bz2 31b771f75d155f3d0bee76a246040894 squid-3.3.9-loggable-urlgroup.patch 473f8f6dabaec2bd73134d8288deea3d cf_gen-pthread.patch 9e71076799d334faba6f4954594e7b4a bug-3679.patch -905e57c6d41414f54a75a5c0f9f7fac7 squid.initd +117dacd2403bc6742d383c09da2800e3 squid.initd 2897c725c201be53d3c9a7db0101bdf0 squid.confd 58823e0b86bc2dc71d270208b7b284b4 squid.logrotate" sha256sums="61743782e3b0c7c5bdf2e2457ecc1a5d3e7cc6b56a3d55f2106afe777ce2e5e9 squid-3.3.10.tar.bz2 0a4192ab1df22db309f35d4dcd80414bede84a591776ba7ef775e9e443663c1e squid-3.3.9-loggable-urlgroup.patch 3b05ebd2d4baeb0e01437de768c8fbe76ff446f126d107b73fad6bd0d1968f0c cf_gen-pthread.patch 6b08cd129ea5fef019c78f1818c628e1070fe767e362da14844396b671f5a18d bug-3679.patch -3e5786304f218aecd5c01fa4b81aa05092ee3c7652d914b01112222fb5b2796e squid.initd +b9508394f73350ce7c7360a21f02117195a38d4a8c1f59bbb566d0c457030913 squid.initd ec2a9f3308129354783c5088fb37148eda102fe9397fb7bbe90243d9223ee2e1 squid.confd b6efdb3261c2e4b5074ef49160af8b96e65f934c7fd64b8954df48aa41cd9b67 squid.logrotate" sha512sums="8f50824c8442254c7675dffe272ee8aab10fc690d0e499e6e31bbfdd2b8d30e4d2e7ade251be5a93904ba81d6a55dd25d43578b9dea1b044adb66d8a896f734c squid-3.3.10.tar.bz2 80360600275cb1b9c484c41c169dedc841c92fa519e9f146bb66fdb947b2dc897a72d49509180f88c4d9fb373457c9117838599ad41e272ecb2972738e905b7f squid-3.3.9-loggable-urlgroup.patch c5a230fe1f4dda8a3ab064f07c2b93a6f6e3ebdf290cb45da262300d06ac28aa4470a80c8f14db5c9ff4dcc478933d9882bef638a566fe8ad66aec1f96f80be3 cf_gen-pthread.patch b477397f205ba207502a42aae674c85cad85eec831158ea0834361d98ef09a0f103d7a847e101bdd0ece73bbdda9b545960edd5385042bd593733810977e292a bug-3679.patch -d16178aef007bafa976b89def4371fdd05f26c5ab558f6619bf6f6ca915fc783d2314d7d8e96032abfaf7b3f8c8b746031f78a6be1f66245d9303ff3a9feb605 squid.initd +c3e4824da6761dbaabe33dd891311902fd694a84c68827a64212cdb7fcdb78b723c526b95f43d697da71b03e4f1e3e91e3db97b6f181fbd473c451c80f87bec6 squid.initd f13b3ab159fdc7cdcccfe10e494a84fa2d67c999820e166a8ad67523094088c147d3712b00e9cfd0d6b7e3c0cc9a4ad3ee7d7f7d42e11f5b5c4b5e4bf5016b31 squid.confd 89a703fa4f21b6c7c26e64a46fd52407e20f00c34146ade0bea0c4b63d050117c0f8e218f2256a1fbf6abb84f4ec9b0472c9a4092ff6e78f07c4f5a25d0892a5 squid.logrotate" diff --git a/main/squid/squid.initd b/main/squid/squid.initd index 488a45b527..ff13b8c313 100644 --- a/main/squid/squid.initd +++ b/main/squid/squid.initd @@ -20,13 +20,10 @@ upprocval() { # Try to increase the # of filedescriptors we can open. maxfds() { - [ -n "$SQUID_MAXFD" ] || return - [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192 + : ${SQUID_MAXFD:=16384} local minimal_file_max=$(($SQUID_MAXFD + 4096)) upprocval /proc/sys/fs/file-max $minimal_file_max - if /usr/sbin/squid -v | grep -q "\--enable-epoll" ; then - upprocval /proc/sys/fs/epoll/max_user_watches $minimal_file_max - fi + upprocval /proc/sys/fs/epoll/max_user_watches $minimal_file_max ulimit -n $SQUID_MAXFD } |