]> err.no Git - varnish/commitdiff
Copy NFILES knob from redhat/varnish.initrc.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 May 2007 16:19:03 +0000 (16:19 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 May 2007 16:19:03 +0000 (16:19 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1456 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/debian/varnish.default
varnish-cache/debian/varnish.init

index 213c882cbc229b2c1403d5c49b2b620b11a0aa90..77f5ca3a44eda7c8b29a3442210549661e1242b1 100644 (file)
@@ -4,6 +4,9 @@
 # shell script fragment.
 #
 
+# Maximum number of open files (for ulimit -n)
+NFILES=131072
+
 # This file contains 4 alternatives, please use only one.
 
 ## Alternative 1, Minimal configuration, no VCL
index 7b2cfc4899689cf2a981b528ca63adaf998ad03a..e3b1319ef51785c35bf700d0375065c3a8e53dfe 100644 (file)
@@ -31,6 +31,9 @@ if [ -f /etc/default/varnish ] ; then
         . /etc/default/varnish
 fi
 
+# Open files (usually 1024, which is way too small for varnish)
+ulimit -n ${NFILES:-131072}
+
 # If $DAEMON_OPTS is not set at all in /etc/default/varnish, use minimal useful
 # defaults (Backend at localhost:8080, a common place to put a locally
 # installed application server.)