diff options
author | Peter Palfrader <peter@palfrader.org> | 2005-02-02 06:20:38 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2005-02-02 06:20:38 +0000 |
commit | cbb1b33fb552ac49abbf2c7429ac462538ed25e8 (patch) | |
tree | 678a8c3a439f0739fe2a3e7ab8172c11dfab1388 /debian | |
parent | 0551e3a814d9a2df052c430b70c1beede58bd84a (diff) | |
download | tor-cbb1b33fb552ac49abbf2c7429ac462538ed25e8.tar tor-cbb1b33fb552ac49abbf2c7429ac462538ed25e8.tar.gz |
Set ulimit for file descriptors to 4096 in our init script
svn:r3501
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/tor.default | 7 | ||||
-rw-r--r-- | debian/tor.init | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index bebdc8f22..bf77eb610 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ tor (0.1.0.0-alpha-cvs-1) UNRELEASED; urgency=low * Forward port 06_add_compile_time_defaults. * Add libevent-dev to build-depends. * Update URL to tor in debian/control and debian/copyright. + * Set ulimit for file descriptors to 4096 in our init + script. - -- Peter Palfrader <weasel@debian.org> Sun, 23 Jan 2005 16:26:13 +0100 + -- Peter Palfrader <weasel@debian.org> Wed, 2 Feb 2005 07:19:34 +0100 tor (0.0.9.3-1) unstable; urgency=low diff --git a/debian/tor.default b/debian/tor.default index a9a023105..92491c2b1 100644 --- a/debian/tor.default +++ b/debian/tor.default @@ -8,6 +8,13 @@ RUN_DAEMON="yes" # +# Servers sometimes may need more than the default 1024 file descriptors +# if they are very busy and have many clients connected to them. +# (ulimit -n) +# +MAX_FILEDESCRIPTORS=4096 + +# # Uncomment this if you want to get coredumps # ulimit -c unlimited diff --git a/debian/tor.init b/debian/tor.init index 3763996f9..93fb37544 100644 --- a/debian/tor.init +++ b/debian/tor.init @@ -10,6 +10,7 @@ TORPID=/var/run/tor/tor.pid DEFAULTSFILE=/etc/default/$NAME WAITFORDAEMON=10 ARGS="" +MAX_FILEDESCRIPTORS=4096 test -x $DAEMON || exit 0 @@ -49,6 +50,7 @@ case "$1" in echo "Not starting $DESC (Disabled in $DEFAULTSFILE)." else echo "Starting $DESC: $NAME..." + ulimit -n $MAX_FILEDESCRIPTORS start-stop-daemon --start --quiet --oknodo \ --chuid debian-tor:debian-tor \ --pidfile $TORPID \ |