Gentoo Archives: gentoo-user

From: Michael Orlitzky <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Persistent ulimit for daemons
Date: Thu, 02 Aug 2012 15:40:21
Message-Id: 501A9EF8.80804@orlitzky.com
In Reply to: Re: [gentoo-user] Persistent ulimit for daemons by Joost Roeleveld
1 On 08/02/12 01:52, Joost Roeleveld wrote:
2 > On Wednesday, August 01, 2012 10:41:41 AM Michael Orlitzky wrote:
3 >> Is there a blessed method these days for setting the ulimit per-daemon?
4 >>
5 >> The best I've been able to do is a global setting in /etc/rc.conf:
6 >>
7 >> rc_ulimit="-s 1048576"
8 >>
9 >> The entries under /etc/security seem to be ignored when using
10 >> `/etc/init.d/foo start`.
11 >
12 > Michael,
13 >
14 > I had to change the "nofiles" ulimit setting for my webserver. For that, I
15 > simply added the settings to the following file:
16 >
17 > # cat /etc/security/limits.conf | grep apache
18 > apache hard nofile 4096
19 > apache soft nofile 4096
20 >
21 > I would expect the same to work for any other daemon?
22 >
23
24 I thought so too, but it doesn't seem to be working (for any daemon, I
25 even tried with apache just now).
26
27 Can you `cat /proc/<pid>/limits` on one of those apache processes? I get
28 whatever was set for my bash shell rather than what I have in limits.conf.

Replies

Subject Author
Re: [gentoo-user] Persistent ulimit for daemons Joost Roeleveld <joost@××××××××.org>