From: des Date: Sun, 20 May 2007 16:19:03 +0000 (+0000) Subject: Copy NFILES knob from redhat/varnish.initrc. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d85c2f8eceb09ebc269d3d163e2eca324906ee96;p=varnish Copy NFILES knob from redhat/varnish.initrc. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1456 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/debian/varnish.default b/varnish-cache/debian/varnish.default index 213c882c..77f5ca3a 100644 --- a/varnish-cache/debian/varnish.default +++ b/varnish-cache/debian/varnish.default @@ -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 diff --git a/varnish-cache/debian/varnish.init b/varnish-cache/debian/varnish.init index 7b2cfc48..e3b1319e 100644 --- a/varnish-cache/debian/varnish.init +++ b/varnish-cache/debian/varnish.init @@ -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.)