20
8
I have an init.d
script that starts an app using start-stop-daemon --chuid SOME_SYSTEM_USER
. That is, the app runs under a different user, not root.
Problem is, the app needs special limit settings (namely ulimit -n 64000
), which I set in limits.conf
. This works quite nicely when I run it directly from shell: su - SOME_SYSTEM_USER
+ start app from shell.
But when run through the start-stop-daemon --chuid
from /etc/init.d
, these limits are ignored. Then the app fails to work, obviously.
How do I force start-stop-daemon
to honour the ulimit
settings?
Debian Squeeze, 2.6.32-5-686 #1 SMP Sat May 5 01:33:08 UTC 2012 i686 GNU/Linux
If, unlike the OP, you don't know which daemon's crashing, I just got good results on Debian Wheezy restarting daemons after: echo "ulimit -c unlimited" | sudo tee /lib/lsb/init-functions.d/core-limit – Martin Dorey – 2015-07-07T18:59:17.893
Some more valuable background information can be found here: http://serverfault.com/a/642082/22394
– sehe – 2016-05-24T11:40:46.553Just add the
ulimit
setting right before thestart-stop-daemon
command. (i.eulimit -n 64000
) ... for the ignorant like me. – Ryan Schumacher – 2013-11-04T01:07:36.863