Package: nginx
Severity: wishlist
Hi,
We're running into open files limits with our nginx installation. It's a server
with a lot of users. It seems there's no default way to set this, since the
/etc/security/limits.conf is not used by start-stop-daemon. We've resorted to
changing the initscript, but as you can imagine, this is not very robust with
regards to upgrades. So I thought I might have a try at trying to get our
little patch incorporated into the package. Would you consider this, please?
-- System Information:
Debian Release: 5.0.7
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Index: debian/init.d
===================================================================
--- debian/init.d (revision 17791)
+++ debian/init.d (working copy)
@@ -40,6 +40,12 @@
start)
echo -n "Starting $DESC: "
test_nginx_config
+ # Check if the ULIMIT is set in /etc/default/nginx
+ if [ -n $ULIMIT ]
+ then
+ # Set the ulimits
+ ulimit $ULIMIT
+ fi
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_OPTS || true
echo "$NAME."
Index: debian/nginx.default
===================================================================
--- debian/nginx.default (revision 0)
+++ debian/nginx.default (revision 0)
@@ -0,0 +1,3 @@
+# Set the ulimit variable if you need defaults to change.
+# Example: ULIMIT="-n 4096"
+#ULIMIT="-n 4096"