[Bug 938669] Re: upstart jobs do not respect /etc/security/limits.conf
Clint Byrum
clint at fewbar.com
Tue Apr 30 18:05:17 UTC 2013
Excerpts from Van Stokes, Jr.'s message of 2013-04-30 16:08:24 UTC:
> The fix around this issue is a poor solution. We were just hit hard with this very issue running MySQL server on Ubuntu 12.04 LTS. We increased the size of the server and the open files limit and Ubuntu would not honor it. It took many many man hours to stuble onto a post describing the problem and the solution.
> Details can be found here: http://askubuntu.com/questions/288471/mysql-cant-open-files-after-updating-server-errno-24
>
I can understand your frustration, this is a confusing area. However,
PAM is intended as a user oriented library, and daemons are by definition
not users.
In man limits.conf, it is clearly stated:
Also, please note that all limit settings are set per login. They
are not global, nor are they permanent; existing only for the
duration of the session.
mysqld does not have a session, and should not have a session. If that
file worked for daemons in the past, it was by accident because they
were started directly from user sessions. This is precisely why upstart
has the ability to specify ulimits for system daemons like mysqld.
Note that sysctl could also be used to raise the system wide open
files limit.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/938669
Title:
upstart jobs do not respect /etc/security/limits.conf
Status in CUPS - Common Unix Printing System:
New
Status in MySQL Server:
New
Status in Upstart:
Invalid
Status in “upstart” package in Ubuntu:
Invalid
Bug description:
I run a terminalserver under Ubuntu 11.10 (oneiric) and CUPS
1.5.0-8ubuntu6. Unfortunately i get "Max clients reached, holding new
connections..." error.
I try to increase the MaxClients value to 8192 in /etc/cups/cupsd.conf
(and LogLevel to debug) but CUPS reduces this to 1/3 of file
descriptor limit from the system with is by default 1024:
/var/log/cups/error_log
I [22/Feb/2012:12:02:37 +0100] Using default TempDir of /var/spool/cups/tmp...
I [22/Feb/2012:12:02:37 +0100] MaxClients limited to 1/3 (341) of the file descriptor limit (1024)...
I [22/Feb/2012:12:02:37 +0100] Configured for up to 341 clients.
Also i try to set higher file descriptor limit in /etc/security/limits.conf
root hard nofile 64000
root soft nofile 64000
and also add "session required pam_limits.so" to /etc/pam.d/common-
session but CUPS set still MaxClients to 341.
Ulimit seams to works fine:
root at ts:~# ulimit -n
64000
Before i upgrade to Oneiric i have same configuration on Ubuntu 10.04
Lucid and CUPS 1.4.3-1ubuntu1 with works fine.
This seams to by a similar bug to:
https://bugzilla.redhat.com/show_bug.cgi?id=446023
Lets me know if you need some more information.
BR Pawel
To manage notifications about this bug go to:
https://bugs.launchpad.net/cups/+bug/938669/+subscriptions
More information about the foundations-bugs
mailing list