Subject: SOLUTION: setrlimit limit #11 to soft=-1, hard=-1 failed
From: Adam Majer <adamm@zombino.com>
Date: Fri, 29 Aug 2008 20:48:16 -0500

Hi all,

I've been plagued by the following syslog entries for some time,


setrlimit limit #11 to soft=-1, hard=-1 failed: Operation not permitted;
uid=0 euid=0
setrlimit limit #12 to soft=-1, hard=-1 failed: Operation not permitted;
uid=0 euid=0



The cause of the problem is pam's limit module. The obvious solution is
to add the following (or some other limits that are less than the max),

*               soft    sigpending      2179
*               hard    sigpending      5375
*               soft    msgqueue        719200
*               hard    msgqueue        819200

But that will NOT work because root is not part of the *. * matching
only regular users. So, the solution is to set these limits explicitly
under root's name as well as * for non-root users,

root            soft    sigpending      2179
root            hard    sigpending      5375
root            soft    msgqueue        719200
root            hard    msgqueue        819200

Then it will go away. This is not a bug, if you think about it, as
otherwise it would be easy to lock yourself out if you make a wrong
setting :)

I hope this helps someone figure out these issues with your setup.

- Adam