Fixed: maxchild dropped to 100 on config reload if not explicitly set, system-specific tuning hints added to doc

This commit is contained in:
Vladimir Dubrovin committed 2026-08-01 10:22:03 +03:00
1 parent 7b85f6a684
commit 763e21e053
8 files changed
+299 -25

No files matched your search

+10
View File
@@ -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