mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Fixed: maxchild dropped to 100 on config reload if not explicitly set, system-specific tuning hints added to doc
This commit is contained in:
1 parent
7b85f6a684
commit
763e21e053
8 files changed
+299
-25
No files matched your search
@@ -24,9 +24,19 @@ if [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
fi
|
||||
|
||||
# SysV init does not apply limits.conf consistently: start-stop-daemon does not
|
||||
# open a PAM session, so pam_limits is not involved and the daemon inherits the
|
||||
# limits of init. 3proxy needs two descriptors per connection (four for ftppr),
|
||||
# so raise them here. Adjust to match 'maxconn' in the configuration file.
|
||||
set_limits() {
|
||||
ulimit -n 65536 2>/dev/null || ulimit -n 4096 2>/dev/null || true
|
||||
ulimit -u 32768 2>/dev/null || true
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting 3Proxy: "
|
||||
set_limits
|
||||
|
||||
if [ ! -d /var/run/3proxy ]; then
|
||||
mkdir -p /var/run/3proxy
|
||||
|
||||
Reference in new issue
Block a user