[Bug 986159] [NEW] squid3 open file descriptors limit is set incorrectly

Timur Irmatov 986159 at bugs.launchpad.net
Fri Apr 20 12:38:05 UTC 2012


Public bug reported:

As far as I can see, upstart configuration file for squid3 tries to
raise limit of open file descriptors to 65535 in pre-start script.
Apparently, this is not working as expected, because squid3 starts and
reports 'With 1024 file descriptors available' in cache.log

Moving ulimit -n 65535 to script section that starts squid itself solves
this. Patch to /etc/init/squid3.conf:

--- squid3.conf	2012-04-20 17:37:12.636701094 +0500
+++ squid3.conf.new	2012-04-20 17:37:04.624866173 +0500
@@ -47,9 +47,6 @@
  then
   /usr/sbin/squid3 $SQUID_ARGS -z -f $CONFIG
  fi
-
-	umask 027
-	ulimit -n 65535
 end script

 script
@@ -57,5 +54,7 @@
   . /etc/default/squid3
  fi

+	umask 027
+	ulimit -n 65535
  exec /usr/sbin/squid3 -N $SQUID_ARGS -f $CONFIG
 end script

P.S. System is Ubuntu 12.04 fully updated as of 2012-04-20.

** Affects: squid3 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: squid3 ulimit

** Description changed:

  As far as I can see, upstart configuration file for squid3 tries to
  raise limit of open file descriptors to 65535 in pre-start script.
  Apparently, this is not working as expected, because squid3 starts and
  reports 'With 1024 file descriptors available' in cache.log
  
  Moving ulimit -n 65535 to script section that starts squid itself solves
  this. Patch to /etc/init/squid3.conf:
  
  --- squid3.conf	2012-04-20 17:37:12.636701094 +0500
  +++ squid3.conf.new	2012-04-20 17:37:04.624866173 +0500
  @@ -47,9 +47,6 @@
-  	then
-  		/usr/sbin/squid3 $SQUID_ARGS -z -f $CONFIG
-  	fi
+   then
+    /usr/sbin/squid3 $SQUID_ARGS -z -f $CONFIG
+   fi
  -
  -	umask 027
  -	ulimit -n 65535
-  end script
-  
-  script
+  end script
+ 
+  script
  @@ -57,5 +54,7 @@
-  		. /etc/default/squid3
-  	fi
-  
+    . /etc/default/squid3
+   fi
+ 
  +	umask 027
  +	ulimit -n 65535
-  	exec /usr/sbin/squid3 -N $SQUID_ARGS -f $CONFIG
-  end script
+   exec /usr/sbin/squid3 -N $SQUID_ARGS -f $CONFIG
+  end script
+ 
+ P.S. System is Ubuntu 12.04 fully updated as of 2012-04-20.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to squid3 in Ubuntu.
https://bugs.launchpad.net/bugs/986159

Title:
  squid3 open file descriptors limit is set incorrectly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid3/+bug/986159/+subscriptions



More information about the Ubuntu-server-bugs mailing list